r102712 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102711‎ | r102712 | r102713 >
Date:23:15, 10 November 2011
Author:pgehres
Status:ok
Tags:
Comment:
Adding amount switching to all rtbt forms. Added GB form since they just have to be different
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-enets.html (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-eps.html (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html (added) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-sofo.html (modified) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js
@@ -51,7 +51,7 @@
5252 if( amount == null || isNaN( amount.val() ) || amount.val() <= 0 ){
5353 // the amount is not set
5454 $( "#step1wrapper" ).slideDown();
55 - $( "#selected-amount" ).html( '(EUR)' )
 55+ $( "#selected-amount" ).html( '(' + $( 'input[name="currency_code"]' ).val() + ')' );
5656
5757 } else {
5858 showAmount( $( 'input[name="amount"]' ) );
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-enets.html
@@ -41,8 +41,24 @@
4242 <div id="donate-content">
4343 <div id="donate-body" style="padding: 0 1em;">
4444 <form method="post" name="paypalcontribution">
45 - <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount">@amount SGD</span></h3></div>
46 - <div id="amtErrorMessages" class="small"></div>
 45+ <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount"></span> <span class="mute" id="change-amount" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 46+ <div id="step1wrapper" style="display: none;">
 47+ <div id="amtErrorMessages" class="small"></div>
 48+ <table id="amount-table-white">
 49+ <tr>
 50+ <td><label><input id="amountRadio0" type="radio" name="amountRadio" value="5" /> <span id="amountSpan0">5</span></label></td>
 51+ <td><label><input id="amountRadio1" type="radio" name="amountRadio" value="10" /> <span id="amountSpan1">10</span></label></td>
 52+ <td><label><input id="amountRadio2" type="radio" name="amountRadio" value="20" /> <span id="amountSpan2">20</span></label></td>
 53+ <td><label><input id="amountRadio3" type="radio" name="amountRadio" value="50" /> <span id="amountSpan3">50</span></label></td>
 54+ </tr>
 55+ <tr>
 56+ <td><label><input id="amountRadio4" type="radio" name="amountRadio" value="75" /> <span id="amountSpan4">75</span></label></td>
 57+ <td><label><input id="amountRadio5" type="radio" name="amountRadio" value="100" /> <span id="amountSpan5">100</span></label></td>
 58+ <td><label><input id="amountRadio6" type="radio" name="amountRadio" value="250" /> <span id="amountSpan6">250</span></label></td>
 59+ <td><input type="radio" name="amountRadio" id="input_amount_other" value="other" /> <label><span id="amountSpanOther"></span><input type="text" class="txt-sm hint" name="amountGiven" size="4" id="other-amount" title="%donate_interface-other%" placeholder="%donate_interface-other%" onfocus="this.form.input_amount_other.checked=true;"/></label></td>
 60+ </tr>
 61+ </table>
 62+ </div>
4763 <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
4864 <div id="step2wrapper">
4965 <div id="billing-content" class="gainlayout">
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-sofo.html
@@ -41,8 +41,24 @@
4242 <div id="donate-content">
4343 <div id="donate-body" style="padding: 0 1em;">
4444 <form method="post" name="paypalcontribution">
45 - <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount">@amount @currency_code</span></h3></div>
46 - <div id="amtErrorMessages" class="small"></div>
 45+ <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount"></span> <span class="mute" id="change-amount" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 46+ <div id="step1wrapper" style="display: none;">
 47+ <div id="amtErrorMessages" class="small"></div>
 48+ <table id="amount-table-white">
 49+ <tr>
 50+ <td><label><input id="amountRadio0" type="radio" name="amountRadio" value="5" /> <span id="amountSpan0">5</span></label></td>
 51+ <td><label><input id="amountRadio1" type="radio" name="amountRadio" value="10" /> <span id="amountSpan1">10</span></label></td>
 52+ <td><label><input id="amountRadio2" type="radio" name="amountRadio" value="20" /> <span id="amountSpan2">20</span></label></td>
 53+ <td><label><input id="amountRadio3" type="radio" name="amountRadio" value="40" /> <span id="amountSpan3">40</span></label></td>
 54+ </tr>
 55+ <tr>
 56+ <td><label><input id="amountRadio4" type="radio" name="amountRadio" value="55" /> <span id="amountSpan4">55</span></label></td>
 57+ <td><label><input id="amountRadio5" type="radio" name="amountRadio" value="75" /> <span id="amountSpan5">75</span></label></td>
 58+ <td><label><input id="amountRadio6" type="radio" name="amountRadio" value="180" /> <span id="amountSpan6">180</span></label></td>
 59+ <td><input type="radio" name="amountRadio" id="input_amount_other" value="other" /> <label><span id="amountSpanOther"></span><input type="text" class="txt-sm hint" name="amountGiven" size="4" id="other-amount" title="%donate_interface-other%" placeholder="%donate_interface-other%" onfocus="this.form.input_amount_other.checked=true;"/></label></td>
 60+ </tr>
 61+ </table>
 62+ </div>
4763 <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
4864 <div id="step2wrapper">
4965 <div id="billing-content" class="gainlayout">
@@ -86,7 +102,7 @@
87103
88104 <input type="hidden" value="@amount" name="amount" />
89105 <!--<input type="hidden" value="@country" name="country" id="country" /> -->
90 - <input type="hidden" value="@currency_code" name="currency_code" />
 106+ <input type="hidden" value="EUR" name="currency_code" />
91107 <input type="hidden" value="@utm_source" name="utm_source"/>
92108 <input type="hidden" value="@utm_medium" name="utm_medium"/>
93109 <input type="hidden" value="@utm_campaign" name="utm_campaign"/>
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-eps.html
@@ -41,8 +41,24 @@
4242 <div id="donate-content">
4343 <div id="donate-body" style="padding: 0 1em;">
4444 <form method="post" name="paypalcontribution">
45 - <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount">@amount EUR</span></h3></div>
46 - <div id="amtErrorMessages" class="small"></div>
 45+ <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount"></span> <span class="mute" id="change-amount" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 46+ <div id="step1wrapper" style="display: none;">
 47+ <div id="amtErrorMessages" class="small"></div>
 48+ <table id="amount-table-white">
 49+ <tr>
 50+ <td><label><input id="amountRadio0" type="radio" name="amountRadio" value="5" /> <span id="amountSpan0">5</span></label></td>
 51+ <td><label><input id="amountRadio1" type="radio" name="amountRadio" value="10" /> <span id="amountSpan1">10</span></label></td>
 52+ <td><label><input id="amountRadio2" type="radio" name="amountRadio" value="20" /> <span id="amountSpan2">20</span></label></td>
 53+ <td><label><input id="amountRadio3" type="radio" name="amountRadio" value="40" /> <span id="amountSpan3">40</span></label></td>
 54+ </tr>
 55+ <tr>
 56+ <td><label><input id="amountRadio4" type="radio" name="amountRadio" value="55" /> <span id="amountSpan4">55</span></label></td>
 57+ <td><label><input id="amountRadio5" type="radio" name="amountRadio" value="75" /> <span id="amountSpan5">75</span></label></td>
 58+ <td><label><input id="amountRadio6" type="radio" name="amountRadio" value="180" /> <span id="amountSpan6">180</span></label></td>
 59+ <td><input type="radio" name="amountRadio" id="input_amount_other" value="other" /> <label><span id="amountSpanOther"></span><input type="text" class="txt-sm hint" name="amountGiven" size="4" id="other-amount" title="%donate_interface-other%" placeholder="%donate_interface-other%" onfocus="this.form.input_amount_other.checked=true;"/></label></td>
 60+ </tr>
 61+ </table>
 62+ </div>
4763 <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
4864 <div id="step2wrapper">
4965 <div id="billing-content" class="gainlayout">
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
@@ -0,0 +1,160 @@
 2+<script type="text/javascript">
 3+ mw.loader.load('gc.form.rapidhtml.webitects.bt');
 4+ // these must go through RapidHTML and thus are inline
 5+ var amountErrors = ["#general|escape",'#retryMsg|escape','#amount|escape'];
 6+ var billingErrors = ['#fname|escape','#lname|escape','#city|escape','#country|escape','#street|escape','#state|escape','#zip|escape','#emailAdd|escape'];
 7+ var paymentErrors = ['#card_num|escape','#card_type|escape','#cvv|escape'];
 8+ var actionURL = "@action";
 9+ var scriptPath = "@script_path";
 10+</script>
 11+<!--[if lt IE 7]>
 12+<script type="text/javascript">
 13+ mw.loader.load('gc.form.rapidhtml.webitects.ie6');
 14+</script>
 15+<style type="text/css">
 16+ body{
 17+ behavior: url("@script_path/skins/vector/csshover.min.htc");
 18+ }
 19+</style><![endif]-->
 20+<!--[if IE 7]>
 21+<style>
 22+ .gainlayout {
 23+ zoom: 1;
 24+ height: 1%;
 25+ }
 26+</style>
 27+<![endif]-->
 28+
 29+<div class="ltr">
 30+ <table id="layouttable">
 31+ <tr>
 32+ <td>
 33+ <div id="appeal">
 34+ <div id="appeal-content">
 35+ <h2 id="appeal-head"> <span class="mw-headline">{{LanguageSwitch|2011FR/@appeal/title|@language}}</span></h2>
 36+ <div id="appeal-body" class="plainlinks">{{LanguageSwitch|2011FR/@appeal/text|@language}}</div>
 37+ </div>
 38+ </div>
 39+ </td>
 40+ <td>
 41+ <div id="donate">
 42+ <div id="donate-content">
 43+ <div id="donate-body" style="padding: 0 1em;">
 44+ <form method="post" name="paypalcontribution">
 45+ <div id="step1header"><h3>%donate_interface-amount-legend% <span id="selected-amount"></span> <span class="mute" id="change-amount" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 46+ <div id="step1wrapper" style="display: none;">
 47+ <div id="amtErrorMessages" class="small"></div>
 48+ <table id="amount-table-white">
 49+ <tr>
 50+ <td><label><input id="amountRadio0" type="radio" name="amountRadio" value="5" /> <span id="amountSpan0">5</span></label></td>
 51+ <td><label><input id="amountRadio1" type="radio" name="amountRadio" value="10" /> <span id="amountSpan1">10</span></label></td>
 52+ <td><label><input id="amountRadio2" type="radio" name="amountRadio" value="20" /> <span id="amountSpan2">20</span></label></td>
 53+ <td><label><input id="amountRadio3" type="radio" name="amountRadio" value="40" /> <span id="amountSpan3">40</span></label></td>
 54+ </tr>
 55+ <tr>
 56+ <td><label><input id="amountRadio4" type="radio" name="amountRadio" value="55" /> <span id="amountSpan4">55</span></label></td>
 57+ <td><label><input id="amountRadio5" type="radio" name="amountRadio" value="75" /> <span id="amountSpan5">75</span></label></td>
 58+ <td><label><input id="amountRadio6" type="radio" name="amountRadio" value="180" /> <span id="amountSpan6">180</span></label></td>
 59+ <td><input type="radio" name="amountRadio" id="input_amount_other" value="other" /> <label><span id="amountSpanOther"></span><input type="text" class="txt-sm hint" name="amountGiven" size="4" id="other-amount" title="%donate_interface-other%" placeholder="%donate_interface-other%" onfocus="this.form.input_amount_other.checked=true;"/></label></td>
 60+ </tr>
 61+ </table>
 62+ </div>
 63+ <div id="step2header"><h3>%donate_interface-billing-address% <span class="mute" id="change-billing" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 64+ <div id="step2wrapper">
 65+ <div id="billing-content" class="gainlayout">
 66+ <div id="billingErrorMessages" class="small"></div>
 67+ <div id="paymentErrorMessages" class="small"></div>
 68+ <div class="name-fields">
 69+ <span class="name-first"><input class="txt" id="fname" name="fname" title="%donate_interface-donor-fname%" value="@fname" placeholder="%donate_interface-donor-fname%"/></span>
 70+ <span class="name-last"><input class="txt" id="lname" name="lname" title="%donate_interface-donor-lname%" value="@lname" placeholder="%donate_interface-donor-lname%"/></span>
 71+ </div>
 72+ <div class="loc-fields nostate">
 73+ <span class="loc-street"><input class="txt" id="street" name="street" title="%donate_interface-donor-street%" value="@street" placeholder="%donate_interface-donor-street%"/></span>
 74+ <span class="loc-postal"><input class="txt" id="zip" name="zip" title="%donate_interface-donor-postal%" value="@zip" placeholder="%donate_interface-donor-postal%"/></span>
 75+ <span class="loc-city"><input class="txt" id="city" name="city" title="%donate_interface-donor-city%" value="@city" placeholder="%donate_interface-donor-city%"/></span>
 76+ <span class="loc-country">
 77+ <select class="txt" id="country" name="country" value="@country" placeholder="%donate_interface-country%">
 78+ <option value="">%donate_interface-select-country%</option>
 79+ <option value="AT">%donate_interface-country-dropdown-AT%</option>
 80+ <option value="BE">%donate_interface-country-dropdown-BE%</option>
 81+ <option value="DE">%donate_interface-country-dropdown-DE%</option>
 82+ <option value="NL">%donate_interface-country-dropdown-NL%</option>
 83+ <option value="CH">%donate_interface-country-dropdown-CH%</option>
 84+ <option value="GB">%donate_interface-country-dropdown-GB%</option>
 85+ </select>
 86+ </span>
 87+ </div>
 88+ <p><input class="txt" title="%donate_interface-donor-email%" id="emailAdd" name="emailAdd" value="@emailAdd" placeholder="%donate_interface-donor-email%"/> </p>
 89+ <table style="margin-top: 10px;" >
 90+ <tr><td>
 91+ <div id="bt-continue" style="margin-top: 7px;"> <input class="btn" id="bt-continueBtn" type="button" value="%donate_interface-continue%" /></div>
 92+ </td><td>
 93+ <img style="margin-left: 100px;" src="@script_path/extensions/DonationInterface/gateway_forms/includes/sofortEn.png" alt="Sofort">
 94+ </td></tr>
 95+ </table>
 96+ </div>
 97+ </div>
 98+
 99+
 100+
 101+ <input type="hidden" name="returnto" value="Thank_You/en" />
 102+ <input type="hidden" value="0" name="PaypalRedirect" id="PaypalRedirect">
 103+
 104+ <input type="hidden" value="@amount" name="amount" />
 105+ <!--<input type="hidden" value="@country" name="country" id="country" /> -->
 106+ <input type="hidden" value="GBP" name="currency_code" />
 107+ <input type="hidden" value="@utm_source" name="utm_source"/>
 108+ <input type="hidden" value="@utm_medium" name="utm_medium"/>
 109+ <input type="hidden" value="@utm_campaign" name="utm_campaign"/>
 110+ <input type="hidden" value="@language" name="language"/>
 111+ <input type="hidden" value="@referrer" name="referrer"/>
 112+ <input type="hidden" value="@comment" name="comment"/>
 113+ <input type="hidden" value="@comment-option" name="comment-option"/>
 114+ <input type="hidden" value="1" name="email-opt"/>
 115+ <input type="hidden" value="@token" name="token"/>
 116+ <input type="hidden" value="@order_id" name="order_id"/>
 117+ <input type="hidden" value="@numAttempt" name="numAttempt"/>
 118+ <input type="hidden" value="@contribution_tracking_id" name="contribution_tracking_id"/>
 119+ <input type="hidden" value="@data_hash" name="data_hash"/>
 120+ <input type="hidden" value="@owa_session" name="owa_session"/>
 121+ <input type="hidden" value="@owa_ref" name="owa_ref"/>
 122+ <!-- new required fields -->
 123+ <input type="hidden" value="@gateway" name="gateway"/>
 124+ <input type="hidden" value="@payment_method" name="payment_method"/>
 125+ <!-- required fields for bt and dd -->
 126+ <input type="hidden" value="rtbt" name="payment_method"/>
 127+ <input type="hidden" value="rtbt_sofortuberweisung" name="payment_submethod"/>
 128+ <!-- required fields omitted above -->
 129+ <input type="hidden" value="XX" name="state"/>
 130+ </form>
 131+ <div id="where-content">
 132+ {{LanguageSwitch|2011FR/core-appeal-whitebox-nodiv|@language}}
 133+ </div>
 134+ </div>
 135+ </div>
 136+ <p id="informationsharing">%donate_interface-informationsharing|url%</p>
 137+ <table>
 138+ <tr>
 139+ <td>
 140+ <ul id="moreinfolinks">
 141+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Monthly_donations&language=@language&uselang=@language&country=@country">%donate_interface-monthly-donation%</a></li>
 142+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Ways_to_Give&language=@language&uselang=@language&country=@country">%donate_interface-otherways-short%</a></li>
 143+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li>
 144+ <!--<li><a href="">%donate_interface-tax-info%</a></li>--><!-- TODO: localize the link -->
 145+ </ul>
 146+ </td>
 147+ <td>@verisign_logo</td>
 148+ </tr>
 149+ </table>
 150+ </div>
 151+ </td>
 152+ </tr>
 153+ </table>
 154+
 155+
 156+
 157+</div>
 158+
 159+<!-- Wikimedia Project logo
 160+<li id="footer-copyrightico"><a href="https://www.mediawiki.org//wikimediafoundation.org/"><img src="//bits.wikimedia.org/images/wikimedia-button.png" width="88" height="31" alt="Wikimedia Foundation"/></a></li>
 161+ -->
Property changes on: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
___________________________________________________________________
Added: svn:eol-style
1162 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r102732MFT r100644, r100785, r101785, r102120, r102318, r102332, r102341, r102342, r...awjrichards01:31, 11 November 2011

Status & tagging log