===Form-countryspecific-control example===
This is example code from [[Template:2011FR/Form-countryspecific-control/AU]].
<code>
The following CSS is used to enable or disable payment methods for each country by commenting out either the "display: 'status';"(on) or the "display: none;"(off).
<syntaxhighlight lang="css">
<html>
<style type="text/css">
#CC-donate-button{
display: </html>{{CC-status}}<html>;
/*display: none;*/
#Ideal-donate-button{
/*display: </html>{{RT-status}}<html>;*/
display: none;
}
#eps-donate-button{
/*display: </html>{{RT-status}}<html>;*/
display: none;
}
#sofort-donate-button{
/*display: </html>{{RT-status}}<html>;*/
display: none;
}
#DD-donate-button{
/*display: </html>{{DD-status}}<html>;*/
display: none;
}
#PP-donate-button{
display: </html>{{PP-status}}<html>;
/*display: none;*/
}
#PP-USD-donate-button{
/*display: </html>{{PP-status}}<html> !important;*/
display: none;
}
#RPP-donate-button{
/*display: </html>{{PP-status}}<html>;*/
display: none;
}
#YD-donate-button{
/*display: </html>{{YD-status}}<html>;*/
display: none;
}
#MB-donate-button{
/*display: </html>{{MB-status}}<html>;*/
display: none;
}
#BP-donate-button{
/*display: </html>{{BP-status}}<html>;*/
display: none;
}
#BT-donate-button{
display: </html>{{BT-status}}<html>;
/*display: none;*/
}
#BP-donate-button{
display: </html>{{Bpay-status}}<html>;
/*display: none;*/
}
</style>
</html>
{{2012FR/Form-section/Processing/Default
</syntaxhighlight>
| uselanglanguage = {{{ uselanglanguage}}} ▼
This part of the code pulls in the payment processing JS. Most of the perimeter are used to past information around. The only one that should be changed is "GC-CC-ffname". This perimeter changes the credit cards that we accept in that country. A list of options follows:
*cc-vm - Visa, MasterCard
*cc-vma - Visa, MasterCard, AmericanExpress
*cc-vmj - Visa, MasterCard, JCB
*cc-vmaj - Visa, MasterCard, AmericanExpress, JCB
<pre>
{{2011FR/Form-section-processing
▲| uselang = {{{uselang}}}
| country = {{{country}}}
| appeal = {{{appeal}}}
| currency = {{2011FR2012FR/core-currency-codeSwitch/Currency/Code|{{{country}}}}}
| handler = GC
| GC-CC-ffname = cc-vmaj
}}
{{2012FR/Form-section/Radiobuttons/Default
| country = {{{country}}}
| language = {{{language}}}
| currency = {{2012FR/Switch/Currency/Code|{{{country}}}}}
| donate-amount-0 = 5
| donate-amount-1 = 10
| donate-amount-2 = 20
| donate-amount-3 = 25
| donate-amount-4 = 50
| donate-amount-5 = 100
| donate-amount-6 = 250
{{2012FR/Form-section/Paymentmethods/Creditcard}}
{{2012FR/Form-section/Paymentmethods/EWallet/PayPal}}
{{2012FR/Form-section/Paymentmethods/OnlineBT/BPay}}
{{2012FR/Form-section/Paymentmethods/Banktransfer}}
<html>
</code>
This part of the code pulls in the display method for the donation options and sets the values to be displayed. The "donate-amount-*" perimeters set the values that will be used in the country. These values are in the currency that has been set as the local currency.
|