[freeside-commits] freeside/httemplate/edit/cust_main billing.html, 1.31.2.6, 1.31.2.7
Erik Levinson
levinse at wavetail.420.am
Wed Jun 8 20:59:28 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail.420.am:/tmp/cvs-serv24477/httemplate/edit/cust_main
Modified Files:
Tag: FREESIDE_2_1_BRANCH
billing.html
Log Message:
configurable payment date for auto CHEK/CARD, RT10813
Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/billing.html,v
retrieving revision 1.31.2.6
retrieving revision 1.31.2.7
diff -u -w -d -r1.31.2.6 -r1.31.2.7
--- billing.html 3 Jun 2011 18:18:19 -0000 1.31.2.6
+++ billing.html 9 Jun 2011 03:59:26 -0000 1.31.2.7
@@ -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>
+% <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>
+% <SELECT NAME="billday">!
+% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
%
-% '</TD></TR></TABLE>',
+% '</TABLE>',
%
% 'LECB' =>
%
More information about the freeside-commits
mailing list