<INPUT TYPE="hidden" NAME="<%$payby%>_payinfo" VALUE="<% $cust_main->paymask %>">
-% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate )) {
+% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate billday )) {
<INPUT TYPE="hidden" NAME="<% $payby.'_'.$field %>" VALUE="<% $cust_main->get($field) %>">
}
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);
+ var select = (payauto_field.name == 'CARD_payauto') ? 'CARD_billday' : 'CHEK_billday';
+ var span = document.getElementById('td_'+select);
+ select = document.getElementById(select);
if (span == null || select == null) return;
if(payauto_field.checked) {
span.style.color = '#000000';
else {
span.style.color = '#999999';
select.disabled = true;
- select.selectedIndex = 0;
+ //why? select.selectedIndex = 0;
}
}
% my $paytype = $cust_main->paytype;
% my( $account, $aba ) = split('@', $payinfo);
% my $branch = '';
-% ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-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"';
% emt('Charge future payments to this [_1] automatically','credit card').'</TD></TR>'.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!<TR><TD ALIGN="RIGHT" id="card_billday" $card_billday_style>
+% qq!<TR><TD ALIGN="RIGHT" id="td_CARD_billday" $card_billday_style>
% Charge on this day of each month</TD><TD>
-% <SELECT id="select_card_billday" $card_billday_select_disabled NAME="billday">!
+% <SELECT id="CARD_billday" $card_billday_select_disabled NAME="CARD_billday">!
% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
% join('', map { qq!<OPTION VALUE="$_" !.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>" } @FS::cust_main::paytypes).
% qq!</SELECT></TD></TR>!.
%
-% ( $conf->exists('echeck-no_routing')
-% ? '<INPUT TYPE="hidden" NAME="CHEK_payinfo2" VALUE="'.
-% ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). '">'
-% :
-% qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('ABA/Routing number').qq! </TD>!.
-% qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="CHEK_payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
-% qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">!.emt('help').qq!</A>)!.
-% qq!</TD></TR>!
-% ).
+% qq!<TR><TD ALIGN="right" WIDTH="200">${r}!.emt('ABA/Routing number').qq! </TD>!.
+% qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="CHEK_payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
+% qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">!.emt('help').qq!</A>)!.
+% qq!</TD></TR>!.
%
% qq!<INPUT TYPE="hidden" NAME="CHEK_exp_month" VALUE="12">!.
% qq!<INPUT TYPE="hidden" NAME="CHEK_exp_year" VALUE="2037">!.
% emt('Charge future payments to this [_1] automatically','electronic check').'</TD></TR>'.
%
% ( $conf->exists('cust_main-select-billday') ?
-% qq!<TR><TD ALIGN="RIGHT" id="chek_billday" $chek_billday_style>
+% qq!<TR><TD ALIGN="RIGHT" id="td_CHEK_billday" $chek_billday_style>
% Charge on this day of each month</TD><TD>
-% <SELECT id="select_chek_billday" $chek_billday_select_disabled NAME="billday">!
+% <SELECT id="CHEK_billday" $chek_billday_select_disabled NAME="CHEK_billday">!
% . billday_options($cust_main->billday) . qq!</SELECT> </TD></TR>!
% : ''
% ).
<INPUT TYPE="hidden" NAME="cdr_termination_percentage" VALUE="<% $cust_main->cdr_termination_percentage %>">
% }
+%my @available_locales = $conf->config('available-locales');
+%if ( scalar(@available_locales) ) {
+% push @available_locales, '';
+% my %locale_labels = map {
+% my %ll;
+% my %info = FS::Locales->locale_info($_);
+% $ll{$_} = $info{name} . " (" . $info{country} . ")";
+% %ll;
+% } FS::Locales->locales;
+ <& /elements/tr-select.html,
+ 'label' => emt('Invoicing locale'),
+ 'field' => 'locale',
+ 'options' => \@available_locales,
+ 'labels' => \%locale_labels,
+ 'curr_value' => $cust_main->locale,
+ &>
+% }
+
</TABLE>
<% $r %> <% mt('required fields') |h %>