Template:2012FR/Form-section/Radiobuttons/5-buttons: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
update |
rm scripts, were moved to MediaWiki:Common.js |
||
Line 28: | Line 28: | ||
</style> |
</style> |
||
<script> |
|||
function clearOther(box) { |
|||
document.getElementById("input_amount_other").checked = true; |
|||
box.value = ""; |
|||
box.style.color = "#000000"; |
|||
} |
|||
function resetOther(box) { |
|||
box.value = "</html>{{int:donate_interface-other}}<html>"; |
|||
} |
|||
function selectAmount() { |
|||
document.getElementById("input_amount_other_box").value = ""; |
|||
document.getElementsByName("amountGiven")[0].value=""; |
|||
} |
|||
$(document).ready(function() { |
|||
$(".frequency-options label").click(function() { |
|||
$(".frequency-options label").removeClass("checked"); |
|||
$(this).addClass("checked"); |
|||
}); |
|||
$(".radiobuttons-cell label").click(function() { |
|||
$(".radiobuttons-cell label").removeClass("checked"); |
|||
$(this).addClass("checked"); |
|||
}); |
|||
$(".input_amount_other").click(function() { |
|||
$("#input_amount_other_box").focus(); |
|||
}); |
|||
// hide frequency options in India, where we can only handle one-time donations |
|||
if (document.paypalcontribution.country.value === 'IN') { |
|||
$("#frequency_onetime").attr('checked', true); |
|||
$(".frequency-options").hide(); |
|||
$("#cancel-monthly").hide(); |
|||
} |
|||
}); |
|||
</script> |
|||
<input type="hidden" name="currency_code" value="</html>{{{currency|{{2012FR/Switch/Currency/Code|{{{country}}}}}}}}<html>"/> |
<input type="hidden" name="currency_code" value="</html>{{{currency|{{2012FR/Switch/Currency/Code|{{{country}}}}}}}}<html>"/> |
Revision as of 23:18, 10 December 2015