X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fcust_payby.html;h=6404bcb33d975635e4dc7c9e639db4d791c0ea44;hp=60e6eb8b1b594c877415b701ab0cbe2ec653327a;hb=12aceb11a398b7b69bb494e8e26fa03afd088400;hpb=95502dabd865c34d1483b20c583523b12fe9332d diff --git a/httemplate/elements/cust_payby.html b/httemplate/elements/cust_payby.html index 60e6eb8b1..6404bcb33 100644 --- a/httemplate/elements/cust_payby.html +++ b/httemplate/elements/cust_payby.html @@ -71,7 +71,15 @@ VALUE = "<% scalar($cgi->param($name.'_paycvv')) || ('*' x length($cust_payby->paycvv)) %>" onChange = "<% $onchange %>" > -
<% mt('CVV2') |h %> (<% mt('help') |h %>) +
<% mt('CVV2') |h %> <& /elements/popup_link.html, + 'action' => $p.'docs/cvv2.html', + 'label' => mt('(help)'), + 'actionlabel' => 'CVV2 Help', + 'width' => 480, + 'height' => 275, + 'nocenter' => 1, + #popup_name => 'cvv2_popup', + &> > @@ -180,11 +188,11 @@ <& /elements/select-state.html, 'prefix' => $name. '_pay', 'empty' => emt('(choose)'), - 'state' => $cgi->param($name.'_paystate') - || $cust_payby->paystate, + 'state' => ( scalar($cgi->param($name.'_paystate')) + || $cust_payby->paystate ), #was cust_main->country in 3.x, but this will do until/unlesss # someone needs to track foreign bank states - 'country' => scalar($conf->config('countrydefault')) || 'US', + 'country' => ( scalar($conf->config('countrydefault')) || 'US' ), &>
<% mt('Bank state') |h %> @@ -298,8 +306,17 @@ if ( $curr_value ) { $cust_payby = new FS::cust_payby {}; } my $sel_payby = $cgi->param($name.'_payby') || $cust_payby->payby; -$sel_payby = 'CARD' if $sel_payby eq 'DCRD' || $sel_payby eq ''; -$sel_payby = 'CHEK' if $sel_payby eq 'DCHK'; +# convert DCRD to CARD + no weight, and the same for DCHK/CHEK +if ($sel_payby eq 'DCRD') { + $sel_payby = 'CARD'; + $cust_payby->weight(''); +} elsif ($sel_payby eq 'DCHK') { + $sel_payby = 'CHEK'; + $cust_payby->weight(''); +} elsif (!$sel_payby) { + # default + $sel_payby = 'CARD'; +} my @payby = FS::payby->cust_payby; my %conf_payby = map { $_=>1 } $conf->config('payby');