summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-09 03:59:26 +0000
committerlevinse <levinse>2011-06-09 03:59:26 +0000
commit1e40d0ea7fb8f66acf71bd614282a7a8beb19a65 (patch)
tree4c9cc1dd426e5654fcdef32359bee8049140d4e0 /httemplate
parent24d64af883fbf6fdaf777e1486d7d9c2c77405a8 (diff)
configurable payment date for auto CHEK/CARD, RT10813
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/cust_main/billing.html46
1 files changed, 29 insertions, 17 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index b5654f046..a3b5c737e 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -104,11 +104,19 @@
}
function payauto_changed(payauto_field){
- var f = (payauto_field.name == 'CARD_payauto') ? 'card_billday' : 'chek_billday';
- f = document.getElementById(f);
- if ( f == null) return;
- if(payauto_field.checked) f.style.display = '';
- else f.style.display = 'none';
+ var span = (payauto_field.name == 'CARD_payauto') ? 'card_billday' : 'chek_billday';
+ var select = document.getElementById('select_'+span);
+ span = document.getElementById(span);
+ if (span == null || select == null) return;
+ if(payauto_field.checked) {
+ span.style.color = '#000000';
+ select.disabled = false;
+ }
+ else {
+ span.style.color = '#999999';
+ select.disabled = true;
+ select.selectedIndex = 0;
+ }
}
</SCRIPT>
@@ -146,8 +154,10 @@
% $ret;
% }
%
-% my $card_billday_style = $payby eq 'CARD' ? '' : 'style="display: none"';
-% my $chek_billday_style = $payby eq 'CHEK' ? '' : 'style="display: none"';
+% my $card_billday_style = $payby eq 'CARD' ? '' : 'style="color: #999999"';
+% my $chek_billday_style = $payby eq 'CHEK' ? '' : 'style="color: #999999"';
+% my $card_billday_select_disabled = $payby eq 'CARD' ? '' : 'DISABLED';
+% my $chek_billday_select_disabled = $payby eq 'CHEK' ? '' : 'DISABLED';
%
% my %payby = (
%
@@ -202,16 +212,17 @@
%
% qq!<TR><TD COLSPAN=2 WIDTH="608">!.
% qq!<INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CARD_payauto" $CARD_payauto_checked> !.
-% qq!Charge future payments to this card automatically!.
+% qq!Charge future payments to this card automatically</TD></TR>!.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!<BR><DIV id="card_billday" $card_billday_style>
-% Charge on this day of each month <SELECT NAME="billday">!
-% . billday_options($cust_main->billday) . qq!</SELECT> </DIV>!
+% qq!<TR><TD ALIGN="RIGHT" id="card_billday" $card_billday_style>
+% Charge on this day of each month</TD><TD> &nbsp;
+% <SELECT NAME="billday">!
+% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
%
-% '</TD></TR></TABLE>',
+% '</TABLE>',
%
% 'CHEK' =>
%
@@ -249,16 +260,17 @@
%
% qq!<TR><TD COLSPAN=4 WIDTH="608">!.
% qq!<INPUT TYPE="checkbox" onchange="payauto_changed(this);" ID="CHEK_payauto" NAME="CHEK_payauto" $CHEK_payauto_checked> !.
-% qq!Charge future payments to this electronic check automatically!.
+% qq!Charge future payments to this electronic check automatically</TD></TR>!.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!<DIV id="chek_billday" $chek_billday_style>
-% Charge on this day of each month <SELECT NAME="billday">!
-% . billday_options($cust_main->billday) . qq!</SELECT> </DIV>!
+% qq!<TR><TD id="chek_billday" $chek_billday_style>
+% Charge on this day of each month </TD><TD> &nbsp;
+% <SELECT NAME="billday">!
+% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
%
-% '</TD></TR></TABLE>',
+% '</TABLE>',
%
% 'LECB' =>
%