Created
May 4, 2012 23:02
-
-
Save jgarber/2598235 to your computer and use it in GitHub Desktop.
ODEARGODSAVEMEFROMTHISINSANITY!!!!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function hightlightPaymentMethodLogo(payment_method_id) { | |
if(payment_method_id > 0) { | |
var payment_method_logo_id = 'payment_method_logo_' + payment_method_id; | |
var obj = document.getElementById(payment_method_logo_id); | |
obj.style['border-style'] = "solid"; | |
obj.style['border-width'] = "2px"; | |
obj.style['-moz-border-radius'] = "6px"; | |
obj.style['-webkit-border-radius'] = "6px"; | |
obj.style['border-color'] = "#00ff00"; | |
} | |
} | |
function deHightlightPaymentMethodLogo(payment_method_id) { | |
if(payment_method_id > 0) { | |
var payment_method_logo_id = 'payment_method_logo_' + payment_method_id; | |
var obj = document.getElementById(payment_method_logo_id); | |
obj.style['border-style'] = "none"; | |
obj.style['border-width'] = "3px"; | |
obj.style['-moz-border-radius'] = "6px"; | |
obj.style['-webkit-border-radius'] = "6px"; | |
obj.style['border-color'] = "#00ff00"; | |
} | |
} | |
</script> | |
<php? | |
$img_border = "border-style:solid;border-width:2px;-moz-border-radius: 6px;-webkit-border-radius: 6px;border-color: #00ff00;"; | |
$logos[] = "<a onmouseover=\"this.style.cursor='pointer';hightlightPaymentMethodLogo($pm_id);\" onmouseout=\"if(document.forms[0].payment_method_id.value!=$pm_id){deHightlightPaymentMethodLogo($pm_id)};\" onclick=\"unsetErrorMsg('payment_method_id');deHightlightPaymentMethodLogo(document.forms[0].payment_method_id.value);document.forms[0].payment_method_id.value=$pm_id;hightlightPaymentMethodLogo($pm_id);totalDisplay();issuers(function(){ $('select').chosen(); });creditCard();\"><img id=\"payment_method_logo_".$pm_id."\" src=\"images/icons/$pm_logo\" width=\"40px;\" style=\"vertical-align: top;".$img_border."\" alt=\"Logo $description\"/></a>"; | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment