diff --git a/site/views/customers/payment.ctp b/site/views/customers/payment.ctp index 5b0fb43..def1d22 100644 --- a/site/views/customers/payment.ctp +++ b/site/views/customers/payment.ctp @@ -127,36 +127,23 @@ echo $form->create(null, array('id' => 'payment-form', 'action' => 'payment')); '
' + 'Payment #%{id} (%{remove})' + - '
' - + ( - '
' - + ( - '' + - '' + - '' ) + - '
' + + '
' + + ' - + ( - '' + - '' + - '' ) + - '
' + - - '
' - + ( - '' + - '' + - '' ) + - '
' + - - '' ) + + foreach ($types AS $type => $name) { + $div = '
'; + $div .= ''; + $div .= ' '; + $div .= '
'; + echo "'$div' +\n"; + } + ?> '
' + '
' @@ -167,121 +154,26 @@ echo $form->create(null, array('id' => 'payment-form', 'action' => 'payment')); '' ) + '
' + - '' + + $name) { + if ($type == 'cash') + continue; - '' + + $div = ' - '' + - - '' + - - '
', - - // Javascript section -/* '$("#payment-type-cash-%{id}").click(function () {' + */ -/* ' $("#payment-check-div-%{id}").slideUp();' + */ -/* ' $("#payment-moneyorder-div-%{id}").slideUp();' + */ -/* ' $("#payment-ach-div-%{id}").slideUp();' + */ -/* ' $("#payment-creditcard-div-%{id}").slideUp();' + */ -/* ' $("#payment-cash-div-%{id}").slideDown();' + */ -/* '});' + */ - -/* '$("#payment-type-check-%{id}").click(function () {' + */ -/* ' $("#payment-cash-div-%{id}").slideUp();' + */ -/* ' $("#payment-moneyorder-div-%{id}").slideUp();' + */ -/* ' $("#payment-ach-div-%{id}").slideUp();' + */ -/* ' $("#payment-creditcard-div-%{id}").slideUp();' + */ -/* ' $("#payment-check-div-%{id}").slideDown();' + */ -/* '});' + */ - -/* '$("#payment-type-moneyorder-%{id}").click(function () {' + */ -/* ' $("#payment-cash-div-%{id}").slideUp();' + */ -/* ' $("#payment-check-div-%{id}").slideUp();' + */ -/* ' $("#payment-ach-div-%{id}").slideUp();' + */ -/* ' $("#payment-creditcard-div-%{id}").slideUp();' + */ - -/* ' $("#payment-moneyorder-div-%{id}").html(\'' + */ -/* '
' + */ -/* ' ' + */ -/* ' ' + */ -/* '
\');' + */ -/* ' $("#payment-moneyorder-div-%{id}").slideDown();' + */ -/* '});' + */ - -/* '$(".payment-type-%{id}").click(function () {' + */ -/* ' switchPaymentType(%{id}, this);' + */ -/* '});' + */ - -/* '$(".payment-type-%{id}").click(function () {' + */ -/* 'alert("hello");' + */ -/* '});' + */ - - '' + '' ); @@ -291,14 +183,13 @@ function switchPaymentType(paymentid, type) { $(".payment-type-div-"+paymentid).slideUp(); $(".payment-type-div-"+paymentid).html(''); - html = ''; // '
'; // STYLE="display:inline;" switch(type) { case 'cash': break; case 'check': - html += + html = '
' + ' ' + ' Money Order Number' + ' Routing Number' + ' Account Number' + ' ' + '
' + - '
' + '
' + ' ' + ' ' + '
' + - '
' + '
' + ' ' + ' ' + '
'; + break; default: + html = '

INVALID TYPE ('+type+')

'; break; } - //html += '
'; $("#payment-"+type+"-div-"+paymentid).html(html); $("#payment-"+type+"-div-"+paymentid).slideDown(); @@ -363,12 +255,12 @@ function switchPaymentType(paymentid, type) { -->
-Payments - -
-
- Add Another Payment -
+ Payments + +
+
+ Add Another Payment +
' . "\n"; $('#payment-id').val(1); addPaymentSource(false); $("#datepicker").datepicker(); - //$("#debug").html(htmlEncode($("#datepicker").html())); }); - -
diff --git a/site/webroot/js/pmgr.js b/site/webroot/js/pmgr.js index d45892d..4586006 100644 --- a/site/webroot/js/pmgr.js +++ b/site/webroot/js/pmgr.js @@ -92,7 +92,7 @@ function addDiv(id_name, div_name, into_div_name, flash, html, script) { ("$2" == "" ? "$2" : 'remove') + '' + '') + ''; - if (script != "") { + if (script) { html += '';