Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/html/TwoStepTwoColumnLetter3.html |
— | — | @@ -0,0 +1,182 @@ |
| 2 | +<script type="text/javascript"> |
| 3 | + mw.loader.load('pfp.form.rapidhtml.TwoStepTwoColumnLetter3'); |
| 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 | + |
| 12 | +<table width="100%" cellspacing="0" cellpadding="0" border="0"> |
| 13 | + <tbody> |
| 14 | + <tr> |
| 15 | + <td id="appeal" valign="top"> |
| 16 | + {{LanguageSwitch|2011FR/@appeal/text|@language}} |
| 17 | + </td> |
| 18 | + <td id="donate" valign="top"> |
| 19 | + <div id="greenBackground" class=""> |
| 20 | + <noscript> |
| 21 | + <div id="noscript"> |
| 22 | + <p id="noscript-msg">It appears that you do not have JavaScript enabled, or your browser does not support it. In order to provide a safe, secure and pleasant experience, our donation form requires JavaScript.</p><p id="noscript-redirect-msg">If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:</p><p id="noscript-redirect-link"><a href="http://wikimediafoundation.org/wiki/DonateNonJS/en">http://wikimediafoundation.org/wiki/DonateNonJS/en</a></p> |
| 23 | + </div> |
| 24 | + </noscript> |
| 25 | + |
| 26 | + <h2 id="donate-head">Please complete your donation below ...</h2> |
| 27 | + |
| 28 | + <p id="topError" class="creditcard-error-msg"></p> |
| 29 | + |
| 30 | + <form name="payment" method="post" action="@action" autocomplete="off"> |
| 31 | + <div id="payflowpro_gateway-personal-info"> |
| 32 | + <table id="payflow-table-donor"> |
| 33 | + <tbody> |
| 34 | + <tr> |
| 35 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 36 | + </tr> |
| 37 | + <tr> |
| 38 | + <td colspan="2"> |
| 39 | + <table cellspacing="0" cellpadding="4" border="1" id="donation_amount"> |
| 40 | + <tbody> |
| 41 | + <tr> |
| 42 | + <td class="amount_header">Description</td> |
| 43 | + <td class="amount_header" style="text-align:right;width:75px;">Amount</td> |
| 44 | + <td class="amount_header" style="text-align:right;width:75px;">Currency</td> |
| 45 | + </tr> |
| 46 | + <tr> |
| 47 | + <td class="amount_data">Donation</td> |
| 48 | + <td class="amount_data" style="text-align:right;width:75px;">@amount</td> |
| 49 | + <td class="amount_data" style="text-align:right;width:75px;">@currency_code</td> |
| 50 | + </tr> |
| 51 | + </tbody> |
| 52 | + </table> |
| 53 | + </td> |
| 54 | + </tr> |
| 55 | + <tr> |
| 56 | + <td colspan="2"><h3 class="cc_header">Billing information<img src="@script_path/extensions/DonationInterface/gateway_forms/includes/padlock.gif" style="vertical-align:baseline;margin-left:8px;"></h3></td> |
| 57 | + </tr> |
| 58 | + <tr> |
| 59 | + <td class="label"></td> |
| 60 | + <td><img src="@script_path/extensions/DonationInterface/gateway_forms/includes/credit_card_logos.gif"></td> |
| 61 | + </tr> |
| 62 | + <tr> |
| 63 | + <td class="label"><label for="card_num">Card number</label></td> |
| 64 | + <td><input name="card_num" size="30" value="@card_num" type="text" maxlength="100" id="card_num" class="fullwidth" autocomplete="off"></td> |
| 65 | + </tr> |
| 66 | + <tr> |
| 67 | + <td class="label"><label for="mos">Expiration date</label></td> |
| 68 | + <td><select name="mos" id="mos"><option value="01">1 (January)</option><option value="02">2 (February)</option><option value="03">3 (March)</option><option value="04">4 (April)</option><option value="05">5 (May)</option><option value="06">6 (June)</option><option value="07">7 (July)</option><option value="08">8 (August)</option><option value="09">9 (September)</option><option value="10">10 (October)</option><option value="11">11 (November)</option><option value="12">12 (December)</option></select> / <select name="year" id="year"> |
| 69 | + <!--<option value="">Year</option>--> |
| 70 | + <option value="2011">2011</option> |
| 71 | + <option value="2012">2012</option> |
| 72 | + <option value="2013">2013</option> |
| 73 | + <option value="2014">2014</option> |
| 74 | + <option value="2015">2015</option> |
| 75 | + <option value="2016">2016</option> |
| 76 | + <option value="2017">2017</option> |
| 77 | + <option value="2018">2018</option> |
| 78 | + <option value="2019">2019</option> |
| 79 | + <option value="2020">2020</option> |
| 80 | + <option value="2021">2021</option> |
| 81 | + </select></td> |
| 82 | + </tr> |
| 83 | + <tr> |
| 84 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 85 | + </tr> |
| 86 | + <tr> |
| 87 | + <td class="label"><label for="cvv">Security code</label></td> |
| 88 | + <td><input name="cvv" size="5" value="@cvv" type="text" maxlength="10" id="cvv" autocomplete="off"> <a href="javascript:PopupCVV();">Where is this?</a></td> |
| 89 | + </tr> |
| 90 | + <tr> |
| 91 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 95 | + </tr> |
| 96 | + <tr> |
| 97 | + <td class="label"><label for="fname">Name on card</label></td> |
| 98 | + <td><input name="fname" size="30" value="@fname" type="text" placeholder="First name" maxlength="25" class="required" id="fname"><input name="lname" size="30" value="@lname" type="text" placeholder="Last name" maxlength="25" id="lname"> |
| 99 | + </td> |
| 100 | + </tr> |
| 101 | + <tr> |
| 102 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 103 | + </tr> |
| 104 | + <tr> |
| 105 | + <td class="label"><label for="street">Billing address</label></td> |
| 106 | + <td><input name="street" size="30" value="@street" type="text" placeholder="Street" maxlength="100" id="street" class="fullwidth"></td> |
| 107 | + </tr> |
| 108 | + <tr> |
| 109 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 110 | + </tr> |
| 111 | + <tr> |
| 112 | + <td class="label"></td> |
| 113 | + <td><input name="city" size="18" value="@city" type="text" placeholder="City" maxlength="40" id="city"> |
| 114 | + <select id="state" name="state" value="@state" > |
| 115 | + <option value=""></option> |
| 116 | + <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> |
| 117 | + </select> |
| 118 | + <input name="zip" size="5" value="@zip" type="text" placeholder="Zip code" maxlength="10" id="zip"> |
| 119 | + </td> |
| 120 | + </tr> |
| 121 | + <tr> |
| 122 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 123 | + </tr> |
| 124 | + <tr> |
| 125 | + <td class="label"><label for="emailAdd">E-mail receipt to</label></td> |
| 126 | + <td><input name="emailAdd" size="30" value="@emailAdd" type="text" placeholder="Email address" maxlength="64" id="emailAdd" class="fullwidth"></td> |
| 127 | + </tr> |
| 128 | + <tr> |
| 129 | + <td class="label"></td> |
| 130 | + <td> |
| 131 | + <div id="mw-donate-submit-button"> <br> |
| 132 | + <input id="ccSubmitButton" name="ccSubmitButton" src="@script_path/extensions/DonationInterface/gateway_forms/includes/submit-donation-button.png" alt="Submit donation" type="image"> |
| 133 | + </div> |
| 134 | + <div class="mw-donate-submessage" id="payflowpro_gateway-donate-submessage"> |
| 135 | + <img src="@script_path/extensions/DonationInterface/gateway_forms/includes/padlock.gif" style="vertical-align:baseline;margin-right:4px;">Your credit / debit card will be securely processed. |
| 136 | + </div> |
| 137 | + </td> |
| 138 | + </tr> |
| 139 | + </tbody> |
| 140 | + </table> |
| 141 | + |
| 142 | + </div> |
| 143 | + <input type="hidden" name="gateway" value="payflowpro" id="gateway" /> |
| 144 | + <input type="hidden" name="returnto" value="Thank_You/en" /> |
| 145 | + <input type="hidden" value="0" name="PaypalRedirect" id="PaypalRedirect"> |
| 146 | + <input type="hidden" value="@amount" name="amount"> |
| 147 | + <input type="hidden" value="@currency_code" name="currency_code"> |
| 148 | + <input type="hidden" value="US" name="country" id="country" /> |
| 149 | + <input type="hidden" value="@expiration" name="expiration" id="expiration"/> |
| 150 | + <input type="hidden" value="USD" name="currency_code" /> |
| 151 | + <input type="hidden" value="@utm_source" name="utm_source"/> |
| 152 | + <input type="hidden" value="@utm_medium" name="utm_medium"/> |
| 153 | + <input type="hidden" value="@utm_campaign" name="utm_campaign"/> |
| 154 | + <input type="hidden" value="@language" name="language"/> |
| 155 | + <input type="hidden" value="@referrer" name="referrer"/> |
| 156 | + <input type="hidden" value="@comment" name="comment"/> |
| 157 | + <input type="hidden" value="@comment-option" name="comment-option"/> |
| 158 | + <input type="hidden" value="1 " name="email-opt"/> |
| 159 | + <input type="hidden" value="@token" name="token"/> |
| 160 | + <input type="hidden" value="@order_id" name="order_id"/> |
| 161 | + <input type="hidden" value="@numAttempt" name="numAttempt"/> |
| 162 | + <input type="hidden" value="@contribution_tracking_id" name="contribution_tracking_id"/> |
| 163 | + <input type="hidden" value="@data_hash" name="data_hash"/> |
| 164 | + <input type="hidden" value="@owa_session" name="owa_session"/> |
| 165 | + <input type="hidden" value="@owa_ref" name="owa_ref"/> |
| 166 | + <!-- new required fields --> |
| 167 | + <input type="hidden" value="@gateway" name="gateway"/> |
| 168 | + <input type="hidden" value="cc" name="payment_method"/> |
| 169 | + </form> |
| 170 | + <div class="payflow-cc-form-section" id="payflowpro_gateway-donate-addl-info"> |
| 171 | + <div id="payflowpro_gateway-donate-addl-info-text"> |
| 172 | + <div style="text-align:center;">* * *</div> |
| 173 | + <div class="">We do not store your credit card information, and your personal data is subject to our <a href="http://wikimediafoundation.org/wiki/Donor_policy">donor privacy policy</a>.</div><div class="">There are <a href="http://wikimediafoundation.org/wiki/Ways_to_Give/en">other ways to give</a>, including by check.</div> |
| 174 | + <div class="">Questions or comments? Contact: <a href="mailto:donate@wikimedia.org">donate@wikimedia.org</a> |
| 175 | + </div> |
| 176 | + </div> |
| 177 | + </div> |
| 178 | + <div style="clear:both;"></div> |
| 179 | + </div> |
| 180 | + </td> |
| 181 | + </tr> |
| 182 | + </tbody> |
| 183 | +</table> |
\ No newline at end of file |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/html/TwoStepTwoColumnLetter3.html |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 184 | + native |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/html/TwoStepTwoColumnLetter3-legal.html |
— | — | @@ -0,0 +1,187 @@ |
| 2 | +<script type="text/javascript"> |
| 3 | + mw.loader.load('pfp.form.rapidhtml.TwoStepTwoColumnLetter3'); |
| 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 | + |
| 12 | +<table width="100%" cellspacing="0" cellpadding="0" border="0"> |
| 13 | + <tbody> |
| 14 | + <tr> |
| 15 | + <td id="appeal" valign="top"> |
| 16 | + {{LanguageSwitch|2011FR/@appeal/text|@language}} |
| 17 | + </td> |
| 18 | + <td id="donate" valign="top"> |
| 19 | + <div id="greenBackground" class=""> |
| 20 | + <noscript> |
| 21 | + <div id="noscript"> |
| 22 | + <p id="noscript-msg">It appears that you do not have JavaScript enabled, or your browser does not support it. In order to provide a safe, secure and pleasant experience, our donation form requires JavaScript.</p><p id="noscript-redirect-msg">If you cannot or do not wish to enable JavaScript, you may still contribute by visiting:</p><p id="noscript-redirect-link"><a href="http://wikimediafoundation.org/wiki/DonateNonJS/en">http://wikimediafoundation.org/wiki/DonateNonJS/en</a></p> |
| 23 | + </div> |
| 24 | + </noscript> |
| 25 | + |
| 26 | + <h2 id="donate-head">Please complete your donation below ...</h2> |
| 27 | + |
| 28 | + <p id="topError" class="creditcard-error-msg"></p> |
| 29 | + |
| 30 | + <form name="payment" method="post" action="@action" autocomplete="off"> |
| 31 | + <div id="payflowpro_gateway-personal-info"> |
| 32 | + <table id="payflow-table-donor"> |
| 33 | + <tbody> |
| 34 | + <tr> |
| 35 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 36 | + </tr> |
| 37 | + <tr> |
| 38 | + <td colspan="2"> |
| 39 | + <table cellspacing="0" cellpadding="4" border="1" id="donation_amount"> |
| 40 | + <tbody> |
| 41 | + <tr> |
| 42 | + <td class="amount_header">Description</td> |
| 43 | + <td class="amount_header" style="text-align:right;width:75px;">Amount</td> |
| 44 | + <td class="amount_header" style="text-align:right;width:75px;">Currency</td> |
| 45 | + </tr> |
| 46 | + <tr> |
| 47 | + <td class="amount_data">Donation</td> |
| 48 | + <td class="amount_data" style="text-align:right;width:75px;">@amount</td> |
| 49 | + <td class="amount_data" style="text-align:right;width:75px;">@currency_code</td> |
| 50 | + </tr> |
| 51 | + </tbody> |
| 52 | + </table> |
| 53 | + </td> |
| 54 | + </tr> |
| 55 | + <tr> |
| 56 | + <td colspan="2"><h3 class="cc_header">Billing information<img src="@script_path/extensions/DonationInterface/gateway_forms/includes/padlock.gif" style="vertical-align:baseline;margin-left:8px;"></h3></td> |
| 57 | + </tr> |
| 58 | + <tr> |
| 59 | + <td class="label"></td> |
| 60 | + <td><img src="@script_path/extensions/DonationInterface/gateway_forms/includes/credit_card_logos.gif"></td> |
| 61 | + </tr> |
| 62 | + <tr> |
| 63 | + <td class="label"><label for="card_num">Card number</label></td> |
| 64 | + <td><input name="card_num" size="30" value="@card_num" type="text" maxlength="100" id="card_num" class="fullwidth" autocomplete="off"></td> |
| 65 | + </tr> |
| 66 | + <tr> |
| 67 | + <td class="label"><label for="mos">Expiration date</label></td> |
| 68 | + <td><select name="mos" id="mos"><option value="01">1 (January)</option><option value="02">2 (February)</option><option value="03">3 (March)</option><option value="04">4 (April)</option><option value="05">5 (May)</option><option value="06">6 (June)</option><option value="07">7 (July)</option><option value="08">8 (August)</option><option value="09">9 (September)</option><option value="10">10 (October)</option><option value="11">11 (November)</option><option value="12">12 (December)</option></select> / <select name="year" id="year"> |
| 69 | + <!--<option value="">Year</option>--> |
| 70 | + <option value="2011">2011</option> |
| 71 | + <option value="2012">2012</option> |
| 72 | + <option value="2013">2013</option> |
| 73 | + <option value="2014">2014</option> |
| 74 | + <option value="2015">2015</option> |
| 75 | + <option value="2016">2016</option> |
| 76 | + <option value="2017">2017</option> |
| 77 | + <option value="2018">2018</option> |
| 78 | + <option value="2019">2019</option> |
| 79 | + <option value="2020">2020</option> |
| 80 | + <option value="2021">2021</option> |
| 81 | + </select></td> |
| 82 | + </tr> |
| 83 | + <tr> |
| 84 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 85 | + </tr> |
| 86 | + <tr> |
| 87 | + <td class="label"><label for="cvv">Security code</label></td> |
| 88 | + <td><input name="cvv" size="5" value="@cvv" type="text" maxlength="10" id="cvv" autocomplete="off"> <a href="javascript:PopupCVV();">Where is this?</a></td> |
| 89 | + </tr> |
| 90 | + <tr> |
| 91 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 92 | + </tr> |
| 93 | + <tr> |
| 94 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 95 | + </tr> |
| 96 | + <tr> |
| 97 | + <td class="label"><label for="fname">Name on card</label></td> |
| 98 | + <td><input name="fname" size="30" value="@fname" type="text" placeholder="First name" maxlength="25" class="required" id="fname"><input name="lname" size="30" value="@lname" type="text" placeholder="Last name" maxlength="25" id="lname"> |
| 99 | + </td> |
| 100 | + </tr> |
| 101 | + <tr> |
| 102 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 103 | + </tr> |
| 104 | + <tr> |
| 105 | + <td class="label"><label for="street">Billing address</label></td> |
| 106 | + <td><input name="street" size="30" value="@street" type="text" placeholder="Street" maxlength="100" id="street" class="fullwidth"></td> |
| 107 | + </tr> |
| 108 | + <tr> |
| 109 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 110 | + </tr> |
| 111 | + <tr> |
| 112 | + <td class="label"></td> |
| 113 | + <td><input name="city" size="18" value="@city" type="text" placeholder="City" maxlength="40" id="city"> |
| 114 | + <select id="state" name="state" value="@state" > |
| 115 | + <option value=""></option> |
| 116 | + <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> |
| 117 | + </select> |
| 118 | + <input name="zip" size="5" value="@zip" type="text" placeholder="Zip code" maxlength="10" id="zip"> |
| 119 | + </td> |
| 120 | + </tr> |
| 121 | + <tr> |
| 122 | + <td colspan="2"><span class="creditcard-error-msg"></span></td> |
| 123 | + </tr> |
| 124 | + <tr> |
| 125 | + <td class="label"><label for="emailAdd">E-mail receipt to</label></td> |
| 126 | + <td><input name="emailAdd" size="30" value="@emailAdd" type="text" placeholder="Email address" maxlength="64" id="emailAdd" class="fullwidth"></td> |
| 127 | + </tr> |
| 128 | + <tr> |
| 129 | + <td class="label"></td> |
| 130 | + <td> |
| 131 | + <div id="mw-donate-submit-button"> <br> |
| 132 | + <input id="ccSubmitButton" name="ccSubmitButton" src="@script_path/extensions/DonationInterface/gateway_forms/includes/submit-donation-button.png" alt="Submit donation" type="image"> |
| 133 | + </div> |
| 134 | + <div class="mw-donate-submessage" id="payflowpro_gateway-donate-submessage"> |
| 135 | + <img src="@script_path/extensions/DonationInterface/gateway_forms/includes/padlock.gif" style="vertical-align:baseline;margin-right:4px;">Your credit / debit card will be securely processed. |
| 136 | + </div> |
| 137 | + </td> |
| 138 | + </tr> |
| 139 | + </tbody> |
| 140 | + </table> |
| 141 | + |
| 142 | + </div> |
| 143 | + <input type="hidden" name="gateway" value="payflowpro" id="gateway" /> |
| 144 | + <input type="hidden" name="returnto" value="Thank_You/en" /> |
| 145 | + <input type="hidden" value="0" name="PaypalRedirect" id="PaypalRedirect"> |
| 146 | + <input type="hidden" value="@amount" name="amount"> |
| 147 | + <input type="hidden" value="@currency_code" name="currency_code"> |
| 148 | + <input type="hidden" value="US" name="country" id="country" /> |
| 149 | + <input type="hidden" value="@expiration" name="expiration" id="expiration"/> |
| 150 | + <input type="hidden" value="USD" name="currency_code" /> |
| 151 | + <input type="hidden" value="@utm_source" name="utm_source"/> |
| 152 | + <input type="hidden" value="@utm_medium" name="utm_medium"/> |
| 153 | + <input type="hidden" value="@utm_campaign" name="utm_campaign"/> |
| 154 | + <input type="hidden" value="@language" name="language"/> |
| 155 | + <input type="hidden" value="@referrer" name="referrer"/> |
| 156 | + <input type="hidden" value="@comment" name="comment"/> |
| 157 | + <input type="hidden" value="@comment-option" name="comment-option"/> |
| 158 | + <input type="hidden" value="1 " name="email-opt"/> |
| 159 | + <input type="hidden" value="@token" name="token"/> |
| 160 | + <input type="hidden" value="@order_id" name="order_id"/> |
| 161 | + <input type="hidden" value="@numAttempt" name="numAttempt"/> |
| 162 | + <input type="hidden" value="@contribution_tracking_id" name="contribution_tracking_id"/> |
| 163 | + <input type="hidden" value="@data_hash" name="data_hash"/> |
| 164 | + <input type="hidden" value="@owa_session" name="owa_session"/> |
| 165 | + <input type="hidden" value="@owa_ref" name="owa_ref"/> |
| 166 | + <!-- new required fields --> |
| 167 | + <input type="hidden" value="@gateway" name="gateway"/> |
| 168 | + <input type="hidden" value="cc" name="payment_method"/> |
| 169 | + </form> |
| 170 | + </div> |
| 171 | + <p id="informationsharing">%donate_interface-informationsharing|url%</p> |
| 172 | + <table> |
| 173 | + <tr> |
| 174 | + <td> |
| 175 | + <ul id="moreinfolinks"> |
| 176 | + <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> |
| 177 | + <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> |
| 178 | + <li><a href="http://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=FAQ&language=@language&uselang=@language&country=@country">%donate_interface-faqs%</a></li> |
| 179 | + <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> |
| 180 | + </ul> |
| 181 | + </td> |
| 182 | + <td>@verisign_logo</td> |
| 183 | + </tr> |
| 184 | + </table> |
| 185 | + </td> |
| 186 | + </tr> |
| 187 | + </tbody> |
| 188 | +</table> |
\ No newline at end of file |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/html/TwoStepTwoColumnLetter3-legal.html |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 189 | + native |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoStepTwoColumnLetter3.css |
— | — | @@ -0,0 +1,166 @@ |
| 2 | +table#donation_amount { |
| 3 | + background-color:transparent; |
| 4 | + border:1px solid #AAAAAA; |
| 5 | + border-collapse:collapse; |
| 6 | + width: 394px; |
| 7 | +} |
| 8 | +table#donation_amount td { |
| 9 | + border:1px solid #AAAAAA; |
| 10 | +} |
| 11 | +table#donation_amount td.amount_header { |
| 12 | + background-color:#eef2f7; |
| 13 | + font-size:90%; |
| 14 | +} |
| 15 | +table#donation_amount td.amount_data { |
| 16 | + background-color:#daf2db; |
| 17 | +} |
| 18 | +h3.cc_header { |
| 19 | + padding-bottom: 0; |
| 20 | + margin-bottom: 0; |
| 21 | + font-weight: normal; |
| 22 | +} |
| 23 | +div#payflowpro_gateway-donate-addl-info-text { |
| 24 | + font-size: 90%; |
| 25 | + line-height: 120%; |
| 26 | +} |
| 27 | +div#payflowpro_gateway-donate-submessage { |
| 28 | + font-size: 90%; |
| 29 | + line-height: 120%; |
| 30 | +} |
| 31 | +#payflow-table-donor td.label, #payflow-table-comment td.label, #payflow-table-cc td.label { |
| 32 | + padding-right: 0.5em; |
| 33 | + width: 100px; |
| 34 | + white-space: nowrap; |
| 35 | +} |
| 36 | +input#city { |
| 37 | + width: 130px; |
| 38 | +} |
| 39 | +input#zip { |
| 40 | + width: 55px; |
| 41 | +} |
| 42 | +input.hasplaceholder { |
| 43 | + color: rgb(153, 153, 153); |
| 44 | +} |
| 45 | +.payflow-cc-form-section { |
| 46 | + float: none; |
| 47 | + margin-right: 0em; |
| 48 | + margin-bottom: 1em; |
| 49 | +} |
| 50 | + |
| 51 | +#payflowpro_gateway-cc_form_container { |
| 52 | + width: 100%; |
| 53 | +} |
| 54 | + |
| 55 | +#payflowpro_gateway-cc_form_form { |
| 56 | + width: 475px; |
| 57 | + float: right; |
| 58 | + margin-left: 2em; |
| 59 | + padding-left: 2em; |
| 60 | + border-left: 1px solid #BBBBBB; |
| 61 | +} |
| 62 | + |
| 63 | +#payflowpro_gateway-cc_form_letter { |
| 64 | + height: 100%; |
| 65 | +} |
| 66 | + |
| 67 | +#payflowpro_gateway-cc_form_letter p { |
| 68 | + font-size: 1.125em; |
| 69 | + margin-bottom: 1.2em; |
| 70 | +} |
| 71 | + |
| 72 | +#payflowpro_gateway-personal-info { |
| 73 | + margin-right:0 !important; |
| 74 | +} |
| 75 | + |
| 76 | +#payflowpro_gateway-donate-addl-info-secure-logos { |
| 77 | + float: left; |
| 78 | + margin-right: 2em; |
| 79 | +} |
| 80 | + |
| 81 | +#payflowpro_gateway-cc_form_letter_inside { |
| 82 | + padding-top: .5em; |
| 83 | +} |
| 84 | + |
| 85 | +#payflowpro_gateway-cc_otherways { |
| 86 | + padding-top: .5em; |
| 87 | + display: block; |
| 88 | +} |
| 89 | +#payflowpro_gateway-donate-addl-info { |
| 90 | + margin-top:2em !important; |
| 91 | + margin-bottom:1em !important; |
| 92 | +} |
| 93 | + |
| 94 | +#appeal { |
| 95 | + background-color:transparent; |
| 96 | + border-color:transparent; |
| 97 | + border-style:solid; |
| 98 | + border-width:1px 0 1px 1px; |
| 99 | + padding:16px 24px 24px; |
| 100 | +} |
| 101 | +#appeal-head { |
| 102 | + font-size:1.5em; |
| 103 | + line-height:1.125em; |
| 104 | + padding-bottom:0.5em; |
| 105 | + padding-top:0.125em; |
| 106 | +} |
| 107 | +#appeal-body { |
| 108 | + font-size:1.125em; |
| 109 | + margin-bottom:1em; |
| 110 | + padding:0.2em 0; |
| 111 | +} |
| 112 | +#donate { |
| 113 | +} |
| 114 | +#donate-head { |
| 115 | + border:none; |
| 116 | + font-size:1.5em; |
| 117 | + line-height:1.125em; |
| 118 | + padding-bottom:0em; |
| 119 | + padding-top:0.125em; |
| 120 | +} |
| 121 | +#donate-body { |
| 122 | + font-size:1.125em; |
| 123 | + margin-bottom:1em; |
| 124 | +} |
| 125 | + |
| 126 | +/* Move the form up */ |
| 127 | +#mw-head-base { |
| 128 | + height: 1em !important; |
| 129 | +} |
| 130 | + |
| 131 | +/* Hiding content border */ |
| 132 | +table { |
| 133 | + background-color: transparent; |
| 134 | +} |
| 135 | +div#content { |
| 136 | + background-color: transparent !important; |
| 137 | + background-image: none !important; |
| 138 | +} |
| 139 | +div#mw-head-base { |
| 140 | + background-image: none !important; |
| 141 | +} |
| 142 | +#footer { |
| 143 | + background-image: none !important; |
| 144 | +} |
| 145 | + |
| 146 | +/* Hiding stuff we don't need */ |
| 147 | +h1#firstHeading, div#contentSub { |
| 148 | + display: none; |
| 149 | +} |
| 150 | + |
| 151 | +/* NEW STUFF */ |
| 152 | +#greenBackground{ |
| 153 | + padding:16px 24px 24px; |
| 154 | + width:400px; |
| 155 | + background-color:#CCE7CD; |
| 156 | + border:1px solid #5EAC58; |
| 157 | +} |
| 158 | +p#informationsharing { |
| 159 | + width: 400px; |
| 160 | + padding: 0 15px; |
| 161 | + line-height: 14px; |
| 162 | + font-size: 11px; |
| 163 | +} |
| 164 | +ul#moreinfolinks li{ |
| 165 | + list-style: none !important; |
| 166 | + list-style-image: none !important; |
| 167 | +} |
\ No newline at end of file |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/css/TwoStepTwoColumnLetter3.css |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 168 | + native |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms/js/TwoStepTwoColumnLetter3.js |
— | — | @@ -0,0 +1,62 @@ |
| 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 | + // check for RapidHtml errors and display, if any |
| 9 | + var amountErrorString = ""; |
| 10 | + var billingErrorString = ""; |
| 11 | + var paymentErrorString = ""; |
| 12 | + |
| 13 | + // generate formatted errors to display |
| 14 | + var temp = []; |
| 15 | + for ( var e in amountErrors ) |
| 16 | + if ( amountErrors[e] != "" ) |
| 17 | + temp[temp.length] = amountErrors[e]; |
| 18 | + amountErrorString = temp.join( "<br />" ); |
| 19 | + |
| 20 | + temp = []; |
| 21 | + for ( var f in billingErrors ) |
| 22 | + if ( billingErrors[f] != "" ) |
| 23 | + temp[temp.length] = billingErrors[f]; |
| 24 | + billingErrorString = temp.join( "<br />" ); |
| 25 | + |
| 26 | + temp = []; |
| 27 | + for ( var g in paymentErrors ) |
| 28 | + if ( paymentErrors[g] != "" ) |
| 29 | + temp[temp.length] = paymentErrors[g]; |
| 30 | + paymentErrorString = temp.join( "<br />" ); |
| 31 | + |
| 32 | + // show the errors |
| 33 | + if ( amountErrorString != "" ) { |
| 34 | + $( "#topError" ).html( amountErrorString ); |
| 35 | + } else if ( billingErrorString != "" ) { |
| 36 | + $( "#topError" ).html( billingErrorString ); |
| 37 | + } else if ( paymentErrorString != "" ) { |
| 38 | + $( "#topError" ).html( paymentErrorString ); |
| 39 | + } |
| 40 | + |
| 41 | + $( "#ccSubmitButton" ).click( function() { |
| 42 | + // Set expiration date |
| 43 | + $( "input[name='expiration']" ).val( |
| 44 | + $( "select[name='mos']" ).val() + $( "select[name='year']" ).val().substring( 2, 4 ) |
| 45 | + ) |
| 46 | + // Safety check for people who hit the back button on forms with amount radio buttons |
| 47 | + if ( $( "input[name='amountRadio']" ).length ) { |
| 48 | + checkedValue = $( "input[name='amountRadio']:checked" ).val(); |
| 49 | + currentAmount = $( 'input[name="amount"]' ).val(); |
| 50 | + // The currenctAmount could be set to empty string or '0.00' |
| 51 | + if ( ( currentAmount == '0.00' || currentAmount == '' ) && checkedValue && !isNaN( checkedValue ) ) { |
| 52 | + $( 'input[name="amount"]' ).val( checkedValue ); |
| 53 | + } |
| 54 | + } |
| 55 | + if ( validateAmount() ) { |
| 56 | + if ( validate_form() ) { |
| 57 | + return true; |
| 58 | + } |
| 59 | + } |
| 60 | + return false; |
| 61 | + } ); |
| 62 | + |
| 63 | +} ); |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway/forms |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1 | 64 | Merged /trunk/extensions/DonationInterface/payflowpro_gateway/forms:r103219,103223,103229,103235,103237-103239,103243,103245,103247,103253,103255 |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/payflowpro_gateway |
___________________________________________________________________ |
Modified: svn:mergeinfo |
2 | 65 | Merged /trunk/extensions/DonationInterface/payflowpro_gateway:r103219,103223,103229,103235,103237-103239,103243,103245,103247,103253,103255 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_forms/rapidhtml/RapidHtmlResources.php |
— | — | @@ -6,7 +6,7 @@ |
7 | 7 | */ |
8 | 8 | |
9 | 9 | $wgDonationInterfaceRapidHtmlRemoteExtPath = 'DonationInterface/gateway_forms/rapidhtml'; |
10 | | -$wgPayflowRapidHtmlRemoteExtPath = 'DonationInterface/payflowpro_gateway/rapidhtml'; |
| 10 | +$wgPayflowRapidHtmlRemoteExtPath = 'DonationInterface/payflowpro_gateway/forms'; |
11 | 11 | $wgGlobalCollectRapidHtmlRemoteExtPath = 'DonationInterface/globalcollect_gateway/forms'; |
12 | 12 | |
13 | 13 | /** |
— | — | @@ -196,3 +196,14 @@ |
197 | 197 | 'localBasePath' => dirname( __FILE__ ), |
198 | 198 | 'remoteExtPath' => $wgPayflowRapidHtmlRemoteExtPath, |
199 | 199 | ); |
| 200 | + |
| 201 | +/** |
| 202 | + * TwoStepTwoColumnLetter3 Deathmatch |
| 203 | + */ |
| 204 | +$wgResourceModules[ 'pfp.form.rapidhtml.TwoStepTwoColumnLetter3' ] = array( |
| 205 | + 'styles' => 'css/TwoStepTwoColumnLetter3.css', |
| 206 | + 'scripts' => 'js/TwoStepTwoColumnLetter3.js', |
| 207 | + 'dependencies' => array( 'di.form.core.validate' ), |
| 208 | + 'localBasePath' => dirname( __FILE__ ).'/../../payflowpro_gateway/forms', |
| 209 | + 'remoteExtPath' => $wgPayflowRapidHtmlRemoteExtPath, |
| 210 | +); |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/gateway_forms |
___________________________________________________________________ |
Modified: svn:mergeinfo |
200 | 211 | Merged /trunk/extensions/DonationInterface/gateway_forms:r103219,103223,103229,103235,103237-103239,103243,103245,103247,103253,103255 |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects_2_3step.js |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | $( "#other-amount" ).focus( function() { |
168 | 168 | $( '#input_amount_other' ).attr( 'checked', true ); |
169 | 169 | var otherAmount = $( 'input#other-amount' ).val(); |
170 | | - if ( otherAmount && !isNaN( otherAmount ) ) { |
| 170 | + if ( otherAmount ) { |
171 | 171 | setAmount( $( 'input#other-amount' ) ); |
172 | 172 | } |
173 | 173 | } ); |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.js |
— | — | @@ -104,28 +104,3 @@ |
105 | 105 | $( "#selected-amount" ).html( "$" + e.val() + "" ); |
106 | 106 | $( "#change-amount" ).show(); |
107 | 107 | } |
108 | | -window.validateAmount = function() { |
109 | | - var error = true; |
110 | | - var amount = $( 'input[name="amount"]' ).val(); // get the amount |
111 | | - // Normalize weird amount formats. |
112 | | - // Don't mess with these unless you know what you're doing. |
113 | | - amount = amount.replace( /[,.](\d)$/, '\:$10' ); |
114 | | - amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); |
115 | | - amount = amount.replace( /[,.]/g, '' ); |
116 | | - amount = amount.replace( /:/, '.' ); |
117 | | - $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form |
118 | | - |
119 | | - // Check amount is a real number, sets error as true (good) if no issues |
120 | | - error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
121 | | - |
122 | | - // Check amount is at least the minimum |
123 | | - var currency_code = $( 'input[name="currency_code"]' ).val(); |
124 | | - if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) { |
125 | | - wgCurrencyMinimums[currency_code] = 1; |
126 | | - } |
127 | | - if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
128 | | - alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
129 | | - error = true; |
130 | | - } |
131 | | - return !error; |
132 | | -} |
\ No newline at end of file |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects.bt.js |
— | — | @@ -80,7 +80,7 @@ |
81 | 81 | $( "#other-amount" ).focus( function() { |
82 | 82 | $( '#input_amount_other' ).attr( 'checked', true ); |
83 | 83 | var otherAmount = $( 'input#other-amount' ).val(); |
84 | | - if ( otherAmount && !isNaN( otherAmount ) ) { |
| 84 | + if ( otherAmount ) { |
85 | 85 | setAmount( $( 'input#other-amount' ) ); |
86 | 86 | } |
87 | 87 | } ); |
— | — | @@ -120,28 +120,3 @@ |
121 | 121 | $( "#selected-amount" ).html( + e.val() + " " + $( 'input[name="currency_code"]' ).val() ); |
122 | 122 | $( "#change-amount" ).show(); |
123 | 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( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
145 | | - error = true; |
146 | | - } |
147 | | - return !error; |
148 | | -} |
\ No newline at end of file |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd.js |
— | — | @@ -48,6 +48,14 @@ |
49 | 49 | displayCreditCardForm() |
50 | 50 | } |
51 | 51 | } ); |
| 52 | + |
| 53 | + $( "#bt-continueBtn" ).live( "click", function() { |
| 54 | + if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
| 55 | + document.paypalcontribution.action = actionURL; |
| 56 | + document.paypalcontribution.submit(); |
| 57 | + } |
| 58 | + } ); |
| 59 | + |
52 | 60 | // Set the cards to progress to step 3 |
53 | 61 | $( ".cardradio" ).live( "click", function() { |
54 | 62 | if ( validate_personal( document.paypalcontribution ) && validateAmount() ) { |
— | — | @@ -106,7 +114,7 @@ |
107 | 115 | $( "#other-amount" ).focus( function() { |
108 | 116 | $( '#input_amount_other' ).attr( 'checked', true ); |
109 | 117 | var otherAmount = $( 'input#other-amount' ).val(); |
110 | | - if ( otherAmount && !isNaN( otherAmount ) ) { |
| 118 | + if ( otherAmount ) { |
111 | 119 | setAmount( $( 'input#other-amount' ) ); |
112 | 120 | } |
113 | 121 | } ); |
— | — | @@ -146,31 +154,7 @@ |
147 | 155 | $( "#selected-amount" ).html( + e.val() + " " + $( 'input[name="currency_code"]' ).val() ); |
148 | 156 | $( "#change-amount" ).show(); |
149 | 157 | } |
150 | | -function validateAmount() { |
151 | | - var error = true; |
152 | | - var amount = $( 'input[name="amount"]' ).val(); // get the amount |
153 | | - // Normalize weird amount formats. |
154 | | - // Don't mess with these unless you know what you're doing. |
155 | | - amount = amount.replace( /[,.](\d)$/, '\:$10' ); |
156 | | - amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); |
157 | | - amount = amount.replace( /[,.]/g, '' ); |
158 | | - amount = amount.replace( /:/, '.' ); |
159 | | - $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form |
160 | 158 | |
161 | | - // Check amount is a real number, sets error as true (good) if no issues |
162 | | - error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
163 | | - |
164 | | - // Check amount is at least the minimum |
165 | | - var currency_code = $( 'input[name="currency_code"]' ).val(); |
166 | | - if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) { |
167 | | - wgCurrencyMinimums[currency_code] = 1; |
168 | | - } |
169 | | - if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
170 | | - alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
171 | | - error = true; |
172 | | - } |
173 | | - return !error; |
174 | | -} |
175 | 159 | window.showStep1 = function() { |
176 | 160 | // show the correct sections |
177 | 161 | $( "#step1wrapper" ).slideDown(); |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/globalcollect_gateway/forms/js/webitects2nd-US.js |
— | — | @@ -106,17 +106,13 @@ |
107 | 107 | $( "#other-amount" ).focus( function() { |
108 | 108 | $( '#input_amount_other' ).attr( 'checked', true ); |
109 | 109 | var otherAmount = $( 'input#other-amount' ).val(); |
110 | | - if ( otherAmount && !isNaN( otherAmount ) ) { |
| 110 | + if ( otherAmount ) { |
111 | 111 | setAmount( $( 'input#other-amount' ) ); |
112 | 112 | } |
113 | 113 | } ); |
114 | 114 | |
115 | 115 | $( "#step1header" ).click( function() { |
116 | | - // show the correct sections |
117 | | - $( "#step1wrapper" ).slideDown(); |
118 | | - $( "#step2wrapper" ).slideDown(); |
119 | | - $( "#step3wrapper" ).slideUp(); |
120 | | - $( "#change-amount" ).hide(); |
| 116 | + showStep1(); |
121 | 117 | } ); |
122 | 118 | |
123 | 119 | |
— | — | @@ -150,31 +146,7 @@ |
151 | 147 | $( "#selected-amount" ).html( "$" + e.val() ); |
152 | 148 | $( "#change-amount" ).show(); |
153 | 149 | } |
154 | | -function validateAmount() { |
155 | | - var error = true; |
156 | | - var amount = $( 'input[name="amount"]' ).val(); // get the amount |
157 | | - // Normalize weird amount formats. |
158 | | - // Don't mess with these unless you know what you're doing. |
159 | | - amount = amount.replace( /[,.](\d)$/, '\:$10' ); |
160 | | - amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); |
161 | | - amount = amount.replace( /[,.]/g, '' ); |
162 | | - amount = amount.replace( /:/, '.' ); |
163 | | - $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form |
164 | 150 | |
165 | | - // Check amount is a real number, sets error as true (good) if no issues |
166 | | - error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
167 | | - |
168 | | - // Check amount is at least the minimum |
169 | | - var currency_code = $( 'input[name="currency_code"]' ).val(); |
170 | | - if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) { |
171 | | - wgCurrencyMinimums[currency_code] = 1; |
172 | | - } |
173 | | - if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
174 | | - alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
175 | | - error = true; |
176 | | - } |
177 | | - return !error; |
178 | | -} |
179 | 151 | window.showStep1 = function() { |
180 | 152 | // show the correct sections |
181 | 153 | $( "#step1wrapper" ).slideDown(); |
Index: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface/modules/validate_input.js |
— | — | @@ -38,7 +38,48 @@ |
39 | 39 | document.getElementById('payflowpro_gateway-form-submit-paypal').style.display = 'none'; |
40 | 40 | }; |
41 | 41 | |
42 | | -/* |
| 42 | +/** |
| 43 | + * Validate the donation amount to make sure it is formatted correctly and at least a minimum amount. |
| 44 | + */ |
| 45 | +window.validateAmount = function() { |
| 46 | + var error = true; |
| 47 | + var amount = $( 'input[name="amount"]' ).val(); // get the amount |
| 48 | + // Normalize weird amount formats. |
| 49 | + // Don't mess with these unless you know what you're doing. |
| 50 | + amount = amount.replace( /[,.](\d)$/, '\:$10' ); |
| 51 | + amount = amount.replace( /[,.](\d)(\d)$/, '\:$1$2' ); |
| 52 | + amount = amount.replace( /[,.]/g, '' ); |
| 53 | + amount = amount.replace( /:/, '.' ); |
| 54 | + $( 'input[name="amount"]' ).val( amount ); // set the new amount back into the form |
| 55 | + |
| 56 | + // Check amount is a real number, sets error as true (good) if no issues |
| 57 | + error = ( amount == null || isNaN( amount ) || amount.value <= 0 ); |
| 58 | + |
| 59 | + // Check amount is at least the minimum |
| 60 | + var currency_code = $( 'input[name="currency_code"]' ).val(); |
| 61 | + if ( typeof( wgCurrencyMinimums[currency_code] ) == 'undefined' ) { |
| 62 | + wgCurrencyMinimums[currency_code] = 1; |
| 63 | + } |
| 64 | + if ( amount < wgCurrencyMinimums[currency_code] || error ) { |
| 65 | + alert( mw.msg( 'donate_interface-smallamount-error' ).replace( '$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) ); |
| 66 | + error = true; |
| 67 | + // See if we're on a webitects accordian form |
| 68 | + if ( $( '#step1wrapper' ).length ) { |
| 69 | + $( "#step1wrapper" ).slideDown(); |
| 70 | + $( "#paymentContinue" ).show(); |
| 71 | + // If we're on a GlobalCollect iframe form, slide up the 3rd step to force the user to |
| 72 | + // generate a new iframe after they change the form. |
| 73 | + if ( $( '#payment iframe' ).length ) { |
| 74 | + $( "#step3wrapper" ).slideUp(); |
| 75 | + } |
| 76 | + } |
| 77 | + $( '#other-amount' ).val( '' ); |
| 78 | + $( '#other-amount' ).focus(); |
| 79 | + } |
| 80 | + return !error; |
| 81 | +} |
| 82 | + |
| 83 | +/** |
43 | 84 | * Validates the personal information fields |
44 | 85 | * |
45 | 86 | * @input form The form containing the inputs to be checked |
— | — | @@ -47,8 +88,6 @@ |
48 | 89 | */ |
49 | 90 | window.validate_personal = function( form ){ |
50 | 91 | |
51 | | - // TODO: this form should only report a single error for the email address? |
52 | | - |
53 | 92 | var output = ''; |
54 | 93 | var currField = ''; |
55 | 94 | var i = 0; |
— | — | @@ -130,11 +169,8 @@ |
131 | 170 | } |
132 | 171 | |
133 | 172 | var stateField = document.getElementById( 'state' ); |
134 | | - console.debug(stateField); |
135 | | - console.debug(stateField.type); |
136 | 173 | if ( stateField && stateField.type == 'select-one' ) { // state is a dropdown select |
137 | 174 | var selectedState = stateField.options[stateField.selectedIndex].value; |
138 | | - console.debug(selectedState); |
139 | 175 | if ( selectedState == 'YY' || selectedState == '' ) { |
140 | 176 | output += mw.msg( 'donate_interface-error-msg-js' ) + ' ' + mw.msg( 'donate_interface-state-province' ) + '.\r\n'; |
141 | 177 | } |
Property changes on: branches/fundraising/deployment/payments_1.17/extensions/DonationInterface |
___________________________________________________________________ |
Modified: svn:mergeinfo |
142 | 178 | Merged /trunk/extensions/DonationInterface:r103080,103130,103219,103223,103229,103235,103237-103239,103243,103245,103247,103253,103255 |