Template:2011FR/Form-section-radiobuttons-2: Difference between revisions

Content deleted Content added
Cbarr (talk | contribs)
No edit summary
Cbarr (talk | contribs)
No edit summary
 
(14 intermediate revisions by the same user not shown)
Line 6:
font-weight: bold;
font-size: 1.3em;
float: </html>{{#ifeq:{{Template:Ltr-direction|{{{uselang|en}}}}}|rtl|right|left}}<html>;
}
 
Line 15:
 
#input_amount_other_box{
/* color: #aaaaaa; */
color: black;
font-size: 0.8em;
border:1px solid #c0c0c0;
direction: </html>{{Template:Ltr-direction|{{{uselang}}}}}<html>;
}
 
#amount-table{
font-size: 1.2em;
/*width: 100%;*/
}
 
Line 36 ⟶ 39:
#country-container{
/*display: none;*/
float: </html>{{#ifeq:{{Template:Ltr-direction|{{{uselang|en}}}}}|rtl|left|right}}<html>;
}
 
Line 50 ⟶ 53:
font-size: 0.95em;
}
 
a#currency-link{
color: #0645ad;
}
 
a#currency-link:hover{
color: #0645ad;
background-image: none !important;
padding-right: 0 !important;
cursor: pointer;
}
 
</style>
 
Line 61 ⟶ 76:
 
function resetOther(box){
//box.value = "</html>{{int:donate_interface-other}}<html>";
box.value = "</html>{{int:donate_interface-other}}<html>";
//box.style.color = "#aaaaaa";
}
 
function selectAmount(){
//document.getElementById("input_amount_other_box").value = "</html>{{int:donate_interface-other}}<html>";
document.getElementById("input_amount_other_box").style.colorvalue = "#aaaaaa";
//document.getElementById("input_amount_other_box").style.color = "#aaaaaa";
document.getElementsByName("amountGiven")[0].value="";
}
 
function validateFormtriggerClick(formelem){
$('#' + elem + '-container-contained').show();
 
}
var minimums = {
'USD' : 1,
'GBP' : 1, // $1.26
'EUR' : 1, // $1.26
'AUD' : 2, // $1.35
'CAD' : 1, // $0.84
'CHF' : 1, // $0.85
'CZK' : 20, // $1.03
'DKK' : 5, // $0.85
'HKD' : 10, // $1.29
'HUF' : 200, // $0.97
'JPY' : 100, // $1
'NZD' : 2, // $1.18
'NOK' : 10, // $1.44
'PLN' : 5, // $1.78
'SGD' : 2, // $1.35
'SEK' : 10, // $1.28
'ILS' : 5 // $1.39
};
 
function loadCountry(){
var error = true;
//alert(window.location);
 
//var newPage = window.location.value;
// Get amount selection
//newCountry = $("#currency-select").value;
for ( var i = 0; i < form.amount.length; i++ ) {
//newPage.replace("</html>{{{country}}}<html>",newCountry);
if ( form.amount[i].checked ) {
//alert(newPage);
amount = form.amount[i].value;
//window.location = newPage;
}
//return false;
}
if ( form.amountGiven.value != "</html>{{int:donate_interface-other}}<html>" ) {
var otherAmount = form.amountGiven.value;
otherAmount = otherAmount.replace(/[,.](\d)$/, '\:$10');
otherAmount = otherAmount.replace(/[,.](\d)(\d)$/, '\:$1$2');
otherAmount = otherAmount.replace(/[\$,.]/g, '');
otherAmount = otherAmount.replace(/:/, '.');
form.amountGiven.value = otherAmount;
amount = otherAmount;
}
 
// Check amount is a real number
error = ( amount == null || isNaN( amount ) || amount.value <= 0 );
// Check amount is at least the minimum
var currency = form.currency_code.value;
if ( typeof( minimums[currency] ) == 'undefined' ) {
minimums[currency] = 1;
}
if ( amount < minimums[currency] || error ) {
alert( '</html>{{{validation-error-minimum|You must contribute at least $1}}}<html>'.replace('$1', minimums[currency] + ' ' + currency ) );
error = true;
}
return !error;
}
 
</script>
 
<input type="hidden" name="currency_code" value="</html>{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}<html>"/>
<div>
<div id="radiobuttons-table-header">
</html>{{int:donate_interface-amount-legend}}<html>
</div>
<div class="collapsible-container" id="country-container" onclick="triggerClick('country');">
<span class="collapsible-container-trigger" id="country-container-trigger"></html>{{int:donate_interface-country-dropdown-{{{country}}}}}<html> not your country?</span><br/>
<span class="currency-collapsible-container-contained" id="country-container-contained">
 
<select name="currency_code" id="input_currency_code" onchange="loadCountry();">
<option value="US" selected>USD – $</option>
<option value="GB">GBP – £</option>
<option value="FR">EUR – €</option>
<option value="AU">AUD – $</option>
<option value="CA">CAD – $</option>
<option value="CH">CHF – Fr.</option>
<option value="CZ">CZK – Kč</option>
<option value="DK">DKK – kr</option>
<option value="HK">HKD – HK$</option>
<option value="HU">HUF – Ft</option>
<option value="IL">ILS – ₪</option>
<option value="JP">JPY – ¥</option>
<option value="NO">NOK – kr</option>
<option value="NZ">NZD – $</option>
<option value="PL">PLN – zł</option>
<option value="SE">SEK – kr</option>
<option value="SG">SGD – S$</option>
</select>
 
<div id="radiobuttons-table-header">
</span>
</html>{{int:donate_interface-amount-legend}}<html>
</div>
</div>
<div id="radiobuttons-table-body">
<center>
<div id="radiobuttons-table-body">
<table id="amount-table">
<tr>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_0" onclick="selectAmount();" value="</html>{{{donate-amount-0}}}<html>" />
<label for="input_amount_0"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-0}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_1" onclick="selectAmount();" value="</html>{{{donate-amount-1}}}<html>" />
<label for="input_amount_1"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-1}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_2" onclick="selectAmount();" value="</html>{{{donate-amount-2}}}<html>" />
<label for="input_amount_2"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-2}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_3" onclick="selectAmount();" value="</html>{{{donate-amount-3}}}<html>" />
<label for="input_amount_3"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-3}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
</tr>
Line 182 ⟶ 132:
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_4" onclick="selectAmount();" value="</html>{{{donate-amount-4}}}<html>" />
<label for="input_amount_4"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-4}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_5" onclick="selectAmount();" value="</html>{{{donate-amount-5}}}<html>" />
<label for="input_amount_5"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-5}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_6" onclick="selectAmount();" value="</html>{{{donate-amount-6}}}<html>" />
<label for="input_amount_6"></html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}{{{donate-amount-6}}}{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html></label>
</td>
<td class="amount-table-cell">
<input type="radio" name="amount" id="input_amount_other" value="" /></html>{{int:donate_interface-other}}<html>
</html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|before|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html>
<input type="text" name="amountGiven" id="input_amount_other_box" size="3" autocomplete="off" value="</html>{{int:donate_interface-other}}<html>" onfocus="clearOther(this)"/>
</html>{{#ifeq:{{{2011FR/core-currency-position|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|after|{{{2011FR/core-currency-symbol|{{{currency|{{2011FR/core-currency-code|{{{country}}}}}}}}}}|}}<html>
</td>
</tr>
</table>
</center>
</div>
</html>