r102830 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102829‎ | r102830 | r102831 >
Date:00:36, 12 November 2011
Author:pgehres
Status:ok
Tags:
Comment:
Fixing up 2nd step webitects GC CC form
Modified paths:
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd-US.html (added) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js (added) (history)
  • /trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd-US.html
@@ -0,0 +1,157 @@
 2+<script type="text/javascript">
 3+ mw.loader.load('gc.form.rapidhtml.webitects.2nd.US');
 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 class="name-fields">
 68+ <span class="name-first"><input class="txt" id="fname" name="fname" title="%donate_interface-donor-fname%" value="@fname" placeholder="%donate_interface-donor-fname%"/></span>
 69+ <span class="name-last"><input class="txt" id="lname" name="lname" title="%donate_interface-donor-lname%" value="@lname" placeholder="%donate_interface-donor-lname%"/></span>
 70+ </div>
 71+ <div class="loc-fields">
 72+ <span class="loc-street"><input class="txt" id="street" name="street" title="%donate_interface-donor-street%" value="@street" placeholder="%donate_interface-donor-street%"/></span>
 73+ <span class="loc-city"><input class="txt" id="city" name="city" title="%donate_interface-donor-city%" value="@city" placeholder="%donate_interface-donor-city%"/></span>
 74+ <span class="loc-state">
 75+ <select id="state" name="state" class="txt" value="@state" >
 76+ <option value=""></option>
 77+ <option value="AK">AK</option><option value="AL">AL</option><option value="AR">AR</option><option value="AZ">AZ</option><option value="CA">CA</option><option value="CO">CO</option><option value="CT">CT</option><option value="DC">DC</option><option value="DE">DE</option><option value="FL">FL</option><option value="GA">GA</option><option value="HI">HI</option><option value="IA">IA</option><option value="ID">ID</option><option value="IL">IL</option><option value="IN">IN</option><option value="KS">KS</option><option value="KY">KY</option><option value="LA">LA</option><option value="MA">MA</option><option value="MD">MD</option><option value="ME">ME</option><option value="MI">MI</option><option value="MN">MN</option><option value="MO">MO</option><option value="MS">MS</option><option value="MT">MT</option><option value="NC">NC</option><option value="ND">ND</option><option value="NE">NE</option><option value="NH">NH</option><option value="NJ">NJ</option><option value="NM">NM</option><option value="NV">NV</option><option value="NY">NY</option><option value="OH">OH</option><option value="OK">OK</option><option value="OR">OR</option><option value="PA">PA</option><option value="PR">PR</option><option value="RI">RI</option><option value="SC">SC</option><option value="SD">SD</option><option value="TN">TN</option><option value="TX">TX</option><option value="UT">UT</option><option value="VA">VA</option><option value="VT">VT</option><option value="WA">WA</option><option value="WI">WI</option><option value="WV">WV</option><option value="WY">WY</option><option value="AA">AA</option><option value="AE">AE</option><option value="AP">AP</option>
 78+ </select>
 79+ </span>
 80+ <span class="loc-postal"><input class="txt" id="zip" name="zip" title="%donate_interface-zip%" value="@zip" placeholder="%donate_interface-donor-zip%"/></span> <!-- TODO: use postal code on non-US -->
 81+ </div>
 82+ <p><input class="txt" title="%donate_interface-donor-email%" id="emailAdd" name="emailAdd" value="@emailAdd" placeholder="%donate_interface-donor-email%"/></p>
 83+
 84+ <dl class="">
 85+ <dt><span id="select-credit-card" class="label">%donate_interface-select-credit-card%</span></dt>
 86+ <dd class="field" style="margin-bottom: 0;">
 87+ <ul class="options-h" id="cards" style="margin: 0;">
 88+ <li><input id="cc-visa" name="cardtype" type="radio" value="visa" class="cardradio" /> <label for="cc-visa"><img alt="Visa" src="@script_path/extensions/DonationInterface/gateway_forms/includes/card-visa.png" /></label></li>
 89+ <li><input id="cc-mastercard" name="cardtype" type="radio" value="mastercard" class="cardradio" /> <label for="cc-mastercard"><img alt="MasterCard" src="@script_path/extensions/DonationInterface/gateway_forms/includes/card-mastercard.png" /></label></li>
 90+ <li><input id="cc-amex" name="cardtype" type="radio" value="american" class="cardradio" /> <label for="cc-amex"><img alt="American Express" src="@script_path/extensions/DonationInterface/gateway_forms/includes/card-amex.png" /></label></li>
 91+ <li><input id="cc-discover" name="cardtype" type="radio" value="discover" class="cardradio" /> <label for="cc-discover"><img alt="Discover" src="@script_path/extensions/DonationInterface/gateway_forms/includes/card-discover.png" /></label></li>
 92+ </ul>
 93+ <div id="paymentContinue" style="margin-top: 10px; display: none;"> <input class="btn" id="paymentContinueBtn" type="button" value="%donate_interface-continue%" /></div>
 94+ </dd>
 95+ </dl>
 96+ </div>
 97+ </div>
 98+ <div id="step3header"><h3>%donate_interface-cc-form-header-payment% <span class="mute" id="change-payment" style="display: none;">(<a href="#">%donate_interface-change%</a>)</span></h3></div>
 99+ <div id="step3wrapper" style="display: none;">
 100+ <div id="payment" class="gainlayout" style="height:314px;text-align:center;"></div>
 101+ </div>
 102+
 103+ <input type="hidden" name="returnto" value="Thank_You/en" />
 104+ <input type="hidden" value="0" name="PaypalRedirect" id="PaypalRedirect">
 105+
 106+ <input type="hidden" value="@amount" name="amount" />
 107+ <input type="hidden" value="US" name="country" id="country" />
 108+ <input type="hidden" value="USD" name="currency_code" />
 109+ <input type="hidden" value="@utm_source" name="utm_source"/>
 110+ <input type="hidden" value="@utm_medium" name="utm_medium"/>
 111+ <input type="hidden" value="@utm_campaign" name="utm_campaign"/>
 112+ <input type="hidden" value="@language" name="language"/>
 113+ <input type="hidden" value="@referrer" name="referrer"/>
 114+ <input type="hidden" value="@comment" name="comment"/>
 115+ <input type="hidden" value="@comment-option" name="comment-option"/>
 116+ <input type="hidden" value="1" name="email-opt"/>
 117+ <input type="hidden" value="@token" name="token"/>
 118+ <input type="hidden" value="@order_id" name="order_id"/>
 119+ <input type="hidden" value="@numAttempt" name="numAttempt"/>
 120+ <input type="hidden" value="@contribution_tracking_id" name="contribution_tracking_id"/>
 121+ <input type="hidden" value="@data_hash" name="data_hash"/>
 122+ <input type="hidden" value="@owa_session" name="owa_session"/>
 123+ <input type="hidden" value="@owa_ref" name="owa_ref"/>
 124+ <!-- new required fields -->
 125+ <input type="hidden" value="@gateway" name="gateway"/>
 126+ <input type="hidden" value="@payment_method" name="payment_method"/>
 127+ </form>
 128+ <div id="where-content">
 129+ {{LanguageSwitch|2011FR/core-appeal-whitebox-nodiv|@language}}
 130+ </div>
 131+ </div>
 132+ </div>
 133+ <p id="informationsharing">%donate_interface-informationsharing|url%</p>
 134+ <table>
 135+ <tr>
 136+ <td>
 137+ <ul id="moreinfolinks">
 138+ <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>
 139+ <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>
 140+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li>
 141+ <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Tax_Deductibility&language=@language&uselang=@language&country=@country">%donate_interface-tax-info%</a></li>
 142+ </ul>
 143+ </td>
 144+ <td>@verisign_logo</td>
 145+ </tr>
 146+ </table>
 147+ </div>
 148+ </td>
 149+ </tr>
 150+ </table>
 151+
 152+
 153+
 154+</div>
 155+
 156+<!-- Wikimedia Project logo
 157+<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>
 158+ -->
Property changes on: trunk/extensions/DonationInterface/globalcollect_gateway/forms/html/webitects2nd-US.html
___________________________________________________________________
Added: svn:eol-style
1159 + native
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js
@@ -67,15 +67,104 @@
6868 $( "#step3header" ).click( function() {
6969 displayCreditCardForm();
7070 } );
 71+
 72+ // check to see if amount was passed from the previous step
 73+ var amount = $( 'input[name="amount"]' ); // get the amount field
 74+ if( amount == null || isNaN( amount.val() ) || amount.val() <= 0 ){
 75+ // the amount is not set
 76+ $( "#step1wrapper" ).slideDown();
 77+ $( "#selected-amount" ).html( '(' + $( 'input[name="currency_code"]' ).val() + ')' );
 78+
 79+ } else {
 80+ showAmount( $( 'input[name="amount"]' ) );
 81+ }
 82+
 83+ // Set selected amount to amount
 84+ $( 'input[name="amountRadio"]' ).click( function() {
 85+ setAmount( $( this ) );
 86+ } );
 87+ // reset the amount field when "other" is changed
 88+ $( "#other-amount" ).change( function() {
 89+ setAmount( $( this ) );
 90+ } );
 91+
 92+ $( "#step1header" ).click( function() {
 93+ $( "#step1wrapper" ).slideDown();
 94+ $( "#change-amount" ).hide();
 95+ } );
 96+
 97+
 98+ // If the form is being reloaded, restore the amount
 99+ var previousAmount = $( 'input[name="amount"]' ).val();
 100+ if ( previousAmount && previousAmount > 0 ) {
 101+ var matched = false;
 102+ $( 'input[name="amountRadio"]' ).each( function( index ) {
 103+ if ( $( this ).val() == previousAmount ) {
 104+ $( this ).attr( 'checked', true );
 105+ matched = true;
 106+ }
 107+ } );
 108+ if ( !matched ) {
 109+ $( 'input#input_amount_other' ).attr( 'checked', true );
 110+ $( 'input#other-amount' ).val( previousAmount );
 111+ }
 112+ }
71113 } );
72114
 115+// set the hidden amount input to the value of the selected element
 116+function setAmount( e ) {
 117+ $( 'input[name="amount"]' ).val( e.val() );
 118+}
 119+// Display selected amount
 120+function showAmount( e ) {
 121+ $( "#selected-amount" ).html( + e.val() + " " + $( 'input[name="currency_code"]' ).val() );
 122+ $( "#change-amount" ).show();
 123+}
 124+function validateAmount() {
 125+ var error = true;
 126+ var amount = $( 'input[name="amount"]' ).val(); // get the amount
 127+ // Normalize weird amount formats.
 128+ // Don't mess with these unless you know what you're doing.
 129+ amount = amount.replace( /[,.](\d)$/, '\:$10' );
 130+ amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' );
 131+ amount = amount.replace( /[,.]/g, '' );
 132+ amount = amount.replace( /:/, '.' );
 133+ $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form
 134+
 135+ // Check amount is a real number, sets error as true (good) if no issues
 136+ error = ( amount == null || isNaN( amount ) || amount.value <= 0 );
 137+
 138+ // Check amount is at least the minimum
 139+ var currency_code = $( 'input[name="currency_code"]' ).val();
 140+ if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) {
 141+ wgCurrencyMinimums[currency_code] = 1;
 142+ }
 143+ if ( amount < wgCurrencyMinimums[currency_code] || error ) {
 144+ alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) );
 145+ error = true;
 146+ }
 147+ return !error;
 148+}
 149+window.showStep1 = function() {
 150+ // show the correct sections
 151+ $( "#step1wrapper" ).slideDown();
 152+ $( "#step2wrapper" ).slideUp();
 153+ $( "#step3wrapper" ).slideUp();
 154+ $( "#change-amount" ).hide();
 155+ $( "#change-billing" ).show();
 156+ $( "#change-payment" ).show();
 157+ $( "#step1header" ).show(); // just in case
 158+}
 159+
73160 window.showStep2 = function() {
74161 if ( $( '#step3wrapper' ).is(":visible") ) {
75162 $( "#paymentContinue" ).show(); // Show continue button in 2nd section
76163 }
77164 // show the correct sections
 165+ $( "#step1wrapper" ).slideUp();
78166 $( "#step2wrapper" ).slideDown();
79167 $( "#step3wrapper" ).slideUp();
 168+ $( "#change-amount" ).show();
80169 $( "#change-billing" ).hide();
81170 $( "#change-payment" ).show();
82171 $( "#step2header" ).show(); // just in case
@@ -83,8 +172,10 @@
84173
85174 window.showStep3 = function() {
86175 // show the correct sections
 176+ $( "#step1wrapper" ).slideUp();
87177 $( "#step2wrapper" ).slideUp();
88178 $( "#step3wrapper" ).slideDown();
 179+ $( "#change-amount" ).show();
89180 $( "#change-billing" ).show();
90181 $( "#change-payment" ).hide();
91182 $( "#step3header" ).show(); // just in case
Index: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js
@@ -0,0 +1,182 @@
 2+/*
 3+ * The following variable are declared inline in webitects_2_3step.html:
 4+ * amountErrors, billingErrors, paymentErrors, scriptPath, actionURL
 5+ */
 6+$( document ).ready( function () {
 7+
 8+ $( "#step2header" ).show();
 9+ $( "#step2wrapper" ).show();
 10+
 11+ // check for RapidHtml errors and display, if any
 12+ var amountErrorString = "",
 13+ billingErrorString = "",
 14+ paymentErrorString = "";
 15+
 16+ // generate formatted errors to display
 17+ var temp = [];
 18+ for ( var e in amountErrors )
 19+ if ( amountErrors[e] != "" )
 20+ temp[temp.length] = amountErrors[e];
 21+ amountErrorString = temp.join( "<br />" );
 22+
 23+ temp = [];
 24+ for ( var f in billingErrors )
 25+ if ( billingErrors[f] != "" )
 26+ temp[temp.length] = billingErrors[f];
 27+ billingErrorString = temp.join( "<br />" );
 28+
 29+ temp = [];
 30+ for ( var g in paymentErrors )
 31+ if ( paymentErrors[g] != "" )
 32+ temp[temp.length] = paymentErrors[g];
 33+ paymentErrorString = temp.join( "<br />" );
 34+
 35+ // show the errors
 36+ var prevError = false;
 37+ if ( amountErrorString != "" ) {
 38+ $( "#amtErrorMessages" ).html( amountErrorString );
 39+ }
 40+ if ( billingErrorString != "" ) {
 41+ $( "#billingErrorMessages" ).html( billingErrorString );
 42+ }
 43+ if ( paymentErrorString != "" ) {
 44+ $( "#paymentErrorMessages" ).html( paymentErrorString );
 45+ }
 46+
 47+ $( "#paymentContinueBtn" ).live( "click", function() {
 48+ if ( validate_personal( document.paypalcontribution ) ) {
 49+ displayCreditCardForm()
 50+ }
 51+ } );
 52+ // Set the cards to progress to step 3
 53+ $( ".cardradio" ).live( "click", function() {
 54+ if ( validate_personal( document.paypalcontribution ) ) {
 55+ displayCreditCardForm()
 56+ }
 57+ else {
 58+ // show the continue button to indicate how to get to step 3 since they
 59+ // have already clicked on a card image
 60+ $( "#paymentContinue" ).show();
 61+ }
 62+ } );
 63+
 64+ // init all of the header actions
 65+ $( "#step2header" ).click( function() {
 66+ showStep2();
 67+ } );
 68+ $( "#step3header" ).click( function() {
 69+ displayCreditCardForm();
 70+ } );
 71+
 72+ // check to see if amount was passed from the previous step
 73+ var amount = $( 'input[name="amount"]' ); // get the amount field
 74+ if( amount == null || isNaN( amount.val() ) || amount.val() <= 0 ){
 75+ // the amount is not set
 76+ $( "#step1wrapper" ).slideDown();
 77+// $( "#selected-amount" ).html( '(' + $( 'input[name="currency_code"]' ).val() + ')' );
 78+
 79+ } else {
 80+ showAmount( $( 'input[name="amount"]' ) );
 81+ }
 82+
 83+ // Set selected amount to amount
 84+ $( 'input[name="amountRadio"]' ).click( function() {
 85+ setAmount( $( this ) );
 86+ } );
 87+ // reset the amount field when "other" is changed
 88+ $( "#other-amount" ).change( function() {
 89+ setAmount( $( this ) );
 90+ } );
 91+
 92+ $( "#step1header" ).click( function() {
 93+ $( "#step1wrapper" ).slideDown();
 94+ $( "#change-amount" ).hide();
 95+ } );
 96+
 97+
 98+ // If the form is being reloaded, restore the amount
 99+ var previousAmount = $( 'input[name="amount"]' ).val();
 100+ if ( previousAmount && previousAmount > 0 ) {
 101+ var matched = false;
 102+ $( 'input[name="amountRadio"]' ).each( function( index ) {
 103+ if ( $( this ).val() == previousAmount ) {
 104+ $( this ).attr( 'checked', true );
 105+ matched = true;
 106+ }
 107+ } );
 108+ if ( !matched ) {
 109+ $( 'input#input_amount_other' ).attr( 'checked', true );
 110+ $( 'input#other-amount' ).val( previousAmount );
 111+ }
 112+ }
 113+} );
 114+
 115+// set the hidden amount input to the value of the selected element
 116+function setAmount( e ) {
 117+ $( 'input[name="amount"]' ).val( e.val() );
 118+}
 119+// Display selected amount
 120+function showAmount( e ) {
 121+ $( "#selected-amount" ).html( "$" + e.val() );
 122+ $( "#change-amount" ).show();
 123+}
 124+function validateAmount() {
 125+ var error = true;
 126+ var amount = $( 'input[name="amount"]' ).val(); // get the amount
 127+ // Normalize weird amount formats.
 128+ // Don't mess with these unless you know what you're doing.
 129+ amount = amount.replace( /[,.](\d)$/, '\:$10' );
 130+ amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' );
 131+ amount = amount.replace( /[,.]/g, '' );
 132+ amount = amount.replace( /:/, '.' );
 133+ $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form
 134+
 135+ // Check amount is a real number, sets error as true (good) if no issues
 136+ error = ( amount == null || isNaN( amount ) || amount.value <= 0 );
 137+
 138+ // Check amount is at least the minimum
 139+ var currency_code = $( 'input[name="currency_code"]' ).val();
 140+ if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) {
 141+ wgCurrencyMinimums[currency_code] = 1;
 142+ }
 143+ if ( amount < wgCurrencyMinimums[currency_code] || error ) {
 144+ alert( 'You must contribute at least $1'.replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) );
 145+ error = true;
 146+ }
 147+ return !error;
 148+}
 149+window.showStep1 = function() {
 150+ // show the correct sections
 151+ $( "#step1wrapper" ).slideDown();
 152+ $( "#step2wrapper" ).slideUp();
 153+ $( "#step3wrapper" ).slideUp();
 154+ $( "#change-amount" ).hide();
 155+ $( "#change-billing" ).show();
 156+ $( "#change-payment" ).show();
 157+ $( "#step1header" ).show(); // just in case
 158+}
 159+
 160+window.showStep2 = function() {
 161+ if ( $( '#step3wrapper' ).is(":visible") ) {
 162+ $( "#paymentContinue" ).show(); // Show continue button in 2nd section
 163+ }
 164+ // show the correct sections
 165+ $( "#step1wrapper" ).slideUp();
 166+ $( "#step2wrapper" ).slideDown();
 167+ $( "#step3wrapper" ).slideUp();
 168+ $( "#change-amount" ).show();
 169+ $( "#change-billing" ).hide();
 170+ $( "#change-payment" ).show();
 171+ $( "#step2header" ).show(); // just in case
 172+}
 173+
 174+window.showStep3 = function() {
 175+ // show the correct sections
 176+ $( "#step1wrapper" ).slideUp();
 177+ $( "#step2wrapper" ).slideUp();
 178+ $( "#step3wrapper" ).slideDown();
 179+ $( "#change-amount" ).show();
 180+ $( "#change-billing" ).show();
 181+ $( "#change-payment" ).hide();
 182+ $( "#step3header" ).show(); // just in case
 183+}
\ No newline at end of file
Property changes on: trunk/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js
___________________________________________________________________
Added: svn:eol-style
1184 + native

Follow-up revisions

RevisionCommit summaryAuthorDate
r102842MFT r102576, r102577, r102579, r102581, r102804, r102805, r102812, r102819, r...awjrichards02:20, 12 November 2011
r102929Re-attempting MFT r102576, r102577, r102578, r102579, r102581, r102689, r1027...khorn00:50, 14 November 2011

Status & tagging log