X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=a1927fa6e0dbf04acc5ff064c951dd9ee7f6f65c;hp=d6995af05802e312684838e267c9b6c3fb56afba;hb=fdc247b504359ca9e74f63daa771f49393fd70ed;hpb=c40ec6975d9d8275454eb9a1b076a4078d87c8df diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index d6995af05..a1927fa6e 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -103,11 +103,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; + } } @@ -145,8 +153,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 = ( % @@ -200,16 +210,17 @@ % % qq!!. % qq! !. -% emt('Charge future payments to this [_1] automatically','credit card'). +% emt('Charge future payments to this [_1] automatically','credit card').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq!
-% Charge on this day of each month
! +% qq! +% Charge on this day of each month   +% ! % : '' % ). % -% '', +% '', % % 'CHEK' => % @@ -247,16 +258,17 @@ % % qq!!. % qq! !. -% emt('Charge future payments to this [_1] automatically','electronic check'). +% emt('Charge future payments to this [_1] automatically','electronic check').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq!
-% Charge on this day of each month
! +% qq! +% Charge on this day of each month   +% ! % : '' % ). % -% '', +% '', % % 'LECB' => %