Template:2011FR/Form-section-processing-recurring: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#ifeq:{{{handler}}}|GC |
{{#ifeq:{{{handler}}}|GC |
||
|<html> |
|<html> |
||
<div> |
|||
<input type="radio" name="recurring-radiooption" id="monthly-radiooption" onclick="toggleMonthly('monthly-radiooption');" value="" /> |
|||
<label for="monthly-radiooption"></html>{{int:donate_interface-monthly-donation}}*<html></label> |
|||
<input type="radio" name="recurring-radiooption" id="onetime-radiooption" onclick="toggleMonthly('onetime-radiooption');" value="" checked="true"/> |
|||
<label for="onetime-radiooption"></html>One time donation<html></label> |
|||
</div> |
|||
<script type="text/javascript" language="javascript"> |
<script type="text/javascript" language="javascript"> |
||
⚫ | |||
function toggleMonthly(elem) |
|||
{ |
|||
if(elem == "monthly-radiooption") |
|||
⚫ | |||
⚫ | |||
document.getElementsByClass("buttonOnetime").visibility = "hidden"; |
|||
⚫ | |||
else |
|||
⚫ | |||
monthlyDonation = false; |
|||
document.getElementsByClass("buttonOnetime").visibility = "visible"; |
|||
⚫ | |||
⚫ | |||
document.getElementById(elem).checked = true; |
|||
} |
|||
function redirectPayment(i) { |
function redirectPayment(i) { |
||
Line 36: | Line 11: | ||
var paymentType ="cc"; |
var paymentType ="cc"; |
||
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-CC-masthead|none}}}<html>\x26form_name=</html>{{{GC-CC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-CC-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>" |
var action_url = "https://payments.wikimedia.org/index.php/Special:GlobalCollectGateway?uselang=</html>{{int:lang}}<html>\x26masthead=</html>{{{GC-CC-masthead|none}}}<html>\x26form_name=</html>{{{GC-CC-form-name|RapidHtml}}}<html>\x26text_template=</html>{{{GC-CC-text-template|2010/JimmyQuote-green}}}<html>\x26appeal=JimmyQuote-green\x26language=</html>{{int:lang}}<html>" |
||
if(monthlyDonation == true) |
if(monthlyDonation == true) |
||
{ |
{ |
||
action_url += ("\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>").replace('cc','rcc'); |
action_url += ("\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>").replace('cc','rcc'); |
||
} |
} |
||
else |
else |
||
{ |
{ |
||
action_url += "\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>"; |
action_url += "\x26ffname=</html>{{{GC-CC-ffname|webitects2nd}}}<html>"; |
||
} |
} |
||
//************************************ credit card ************************************ |
//************************************ credit card ************************************ |
||
Line 86: | Line 61: | ||
gateway.value = "paypal"; |
gateway.value = "paypal"; |
||
document.paypalcontribution.appendChild(gateway); |
document.paypalcontribution.appendChild(gateway); |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
} |
} |
||
⚫ | |||
if (i=="ew-pp-usd"){ |
if (i=="ew-pp-usd"){ |
||
Line 99: | Line 84: | ||
document.getElementsByName("amountGiven")[0].value=""; |
document.getElementsByName("amountGiven")[0].value=""; |
||
for ( var j = 0; j < document.getElementsByName("amount").length; j++ ) |
for ( var j = 0; j < document.getElementsByName("amount").length; j++ ) |
||
⚫ | |||
document.getElementsByName("amount")[j].checked=false; |
|||
⚫ | |||
} |
} |
||
⚫ | |||
⚫ | |||
var recurring = document.createElement("input"); |
|||
recurring.type = "hidden"; |
|||
recurring.name = "recurring_paypal"; |
|||
recurring.id = "recurring-hidden"; |
|||
recurring.value = "true"; |
|||
document.paypalcontribution.appendChild(recurring); |
|||
⚫ | |||
⚫ | |||
⚫ | |||
if(monthlyDonation == true) |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
paymentType= "pp"; |
paymentType= "pp"; |
||
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
action_url="https://wikimediafoundation.org/wiki/Special:ContributionTracking/</html>{{int:lang}}<html>"; |
Latest revision as of 14:26, 27 December 2011