X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=3ac063509104eef1d0319b646e3132a9a6ed7faf;hb=8c5a1df1a46121c75a829eb1d57956c9731940ab;hp=07266b9a6fc8ed4d94ca723d73d2b12a6191dc57;hpb=b5dbd9e1bcbb701a20ed23e723b1e0105fd7c1a1;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 07266b9a6..3ac063509 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -95,14 +95,29 @@ return true; } - 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 = 'inline'; - else f.style.display = 'none'; + 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 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; + } + } + <& /elements/init_overlib.html &> @@ -110,6 +125,8 @@ % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; % my( $account, $aba ) = split('@', $payinfo); +% my $branch = ''; +% ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-branch'); % % my $disabled = 'DISABLED style="background-color: #dddddd"'; % my $text_disabled = 'style="color: #999999"'; @@ -129,7 +146,7 @@ % % sub billday_options { % my $curr_value = shift; -% my $ret = ''; +% my $ret = ''; % for my $billday ( 1 .. 28 ) { % my $sel = ''; % $sel = "SELECTED='SELECTED'" if $curr_value == $billday; @@ -137,8 +154,11 @@ % } % $ret; % } -% my $billday_card_display = $payby eq 'CARD' ? 'inline' : 'none'; -% my $billday_chek_display = $payby eq 'CHEK' ? 'inline' : '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 = ( % @@ -190,12 +210,15 @@ % qq!${r}!.emt('Exact name on card').qq! !. % qq!!. % -% qq! !.emt('Charge future payments to this card automatically').qq!!. +% qq!!. +% qq! !. +% emt('Charge future payments to this [_1] automatically','credit card').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq! -% Charge on the day of each month! +% qq! +% Charge on this day of each month   +% ! % : '' % ). % @@ -219,6 +242,10 @@ % qq!!. % qq!!. % +% ( $conf->exists('cust_main-require-bank-branch') ? +% qq!$r !.emt('Branch number').qq! +% ! : '' ). +% % qq!${r}!.emt('Bank name').qq! !. % qq!!. % ( $conf->exists('show_bankstate') ? @@ -235,19 +262,18 @@ % ). % % -% qq! !.emt('Charge future payments to this electronic check automatically').qq!!. +% qq!!. +% qq! !. +% emt('Charge future payments to this [_1] automatically','electronic check').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq! -% Charge on the day of each month! +% qq! +% Charge on this day of each month   +% ! % : '' % ). % -% ' '. -% ' '. -% ' '. -% % '', % % 'LECB' => @@ -393,6 +419,7 @@ 'labels' => \%allopt, 'html_between' => '', 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, + 'onchange' => 'init_payauto_changed();', &> <% &ntable("#cccccc") %> @@ -441,12 +468,14 @@ % } +% unless ( $conf->exists('cust-email-high-visibility')) { <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es) +% } <% mt('Invoice terms') |h %> @@ -526,6 +555,10 @@ function toggle(obj) { <% $r %> <% mt('required fields') |h %> % } + + <%once> my $paystate_label = FS::Msgcat::_gettext('paystate');