[freeside-commits] freeside/httemplate/edit/cust_main billing.html, 1.31.2.4, 1.31.2.5
Erik Levinson
levinse at wavetail.420.am
Thu Jun 2 20:15:10 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail.420.am:/tmp/cvs-serv7381/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.4
retrieving revision 1.31.2.5
diff -u -w -d -r1.31.2.4 -r1.31.2.5
--- billing.html 30 May 2011 23:24:51 -0000 1.31.2.4
+++ billing.html 3 Jun 2011 03:15:08 -0000 1.31.2.5
@@ -96,6 +96,13 @@
return true;
}
+ function init_payauto_changed(){
+ var f = document.getElementById('CARD_payauto');
+ if(f != null) payauto_changed(f);
+ f = document.getElementById('CHEK_payauto');
+ if(f != null) payauto_changed(f);
+ }
+
function payauto_changed(payauto_field){
var f = (payauto_field.name == 'CARD_payauto') ? 'card_billday' : 'chek_billday';
f = document.getElementById(f);
@@ -130,7 +137,7 @@
%
% sub billday_options {
% my $curr_value = shift;
-% my $ret = '<OPTION></OPTION>';
+% my $ret = '';
% for my $billday ( 1 .. 28 ) {
% my $sel = '';
% $sel = "SELECTED='SELECTED'" if $curr_value == $billday;
@@ -148,7 +155,7 @@
% '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
%
% qq!<TR><TD ALIGN="right" WIDTH="200">${r}Card number </TD>!.
-% qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="!. ( $payby =~ /^(CARD|DCRD)$/ ? $payinfo : '' ). qq!" MAXLENGTH=19 onChange="card_changed(this)" onKeyUp="card_changed(this)"></TD></TR>!.
+% qq!<TD WIDTH="408"><INPUT TYPE="text" ID="CARD_payauto" NAME="CARD_payinfo" VALUE="!. ( $payby =~ /^(CARD|DCRD)$/ ? $payinfo : '' ). qq!" MAXLENGTH=19 onChange="card_changed(this)" onKeyUp="card_changed(this)"></TD></TR>!.
%
% qq!<TR><TD ALIGN="right" WIDTH="200">${r}Expiration </TD>!.
% '<TD WIDTH="408">'.
@@ -196,8 +203,8 @@
%
% ( $conf->exists('cust_main-select-billday') ?
% qq!<TR><TD COLSPAN=2 WIDTH="608" id="card_billday" style="display: $billday_card_display">
-% Charge on the <SELECT NAME="billday">!
-% . billday_options($cust_main->billday) . qq!</SELECT> day of each month</TD></TR>!
+% Charge on this day of each month <SELECT NAME="billday">!
+% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
%
@@ -237,19 +244,15 @@
% ).
%
%
-% qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" NAME="CHEK_payauto" $CHEK_payauto_checked> Charge future payments to this electronic check automatically</TD></TR>!.
+% qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" onchange="payauto_changed(this);" ID="CHEK_payauto" NAME="CHEK_payauto" $CHEK_payauto_checked> Charge future payments to this electronic check automatically</TD></TR>!.
%
% ( $conf->exists('cust_main-select-billday') ?
% qq!<TR><TD COLSPAN=2 WIDTH="608" id="chek_billday" style="display: $billday_chek_display">
-% Charge on the <SELECT NAME="billday">!
-% . billday_options($cust_main->billday) . qq!</SELECT> day of each month</TD></TR>!
+% Charge on this day of each month <SELECT NAME="billday">!
+% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
%
-% '<TR><TD> </TD></TR>'.
-% '<TR><TD> </TD></TR>'.
-% '<TR><TD> </TD></TR>'.
-%
% '</TABLE>',
%
% 'LECB' =>
@@ -395,6 +398,7 @@
'labels' => \%allopt,
'html_between' => '</TD></TR></TABLE>',
'layer_callback' => sub { my $layer = shift; $payby{$layer}; },
+ 'onchange' => 'init_payauto_changed();',
)
%>
More information about the freeside-commits
mailing list