diff options
author | Christopher Burger <burgerc@freeside.biz> | 2017-07-10 09:52:54 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2017-08-02 16:24:39 -0400 |
commit | 31f1e1bd302bd88d97d56b20dffad5c5f2388261 (patch) | |
tree | 145ad9c2d0a2e4dd444a31683438a77a2dd770b7 /fs_selfservice/FS-SelfService | |
parent | 57290f5ec7acdfd413cbd6c24026ce153efd9f14 (diff) |
RT# 74537 - Added new selfservice config option to make ECHECK readonly on selfservice, updated selfservice and NGselfservice to look for this option
Diffstat (limited to 'fs_selfservice/FS-SelfService')
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/change_pay.html | 8 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/check.html | 103 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/make_ach_payment.html | 28 |
3 files changed, 97 insertions, 42 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html index 6898dc7f8..e38ba762d 100644 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html @@ -37,6 +37,11 @@ 'PREP' => qq/Prepaid Card/, 'PREPAY' => qq/Prepaid Card/, ); + + ## Don't show CHEK or DCHK option if ACH is read only + delete( $payby_index{'CHEK'} ) unless !$ach_read_only; + delete( $payby_index{'DCHK'} ) unless !$ach_read_only; + tie my %options, 'Tie::IxHash', (); foreach my $payby_option ( grep { exists( $payby_index{$_} ) } @paybys ) { $options{$payby_option} = $payby_index{$payby_option}; @@ -55,6 +60,9 @@ delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'}; delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'}; + ## setting payby to default to layer if only one. should we always display first layer? + if (keys %options == 1) { @p = keys %options; $payby = $p[0]; } + HTML::Widgets::SelectLayers->new( options => \%options, selected_layer => $payby, diff --git a/fs_selfservice/FS-SelfService/cgi/check.html b/fs_selfservice/FS-SelfService/cgi/check.html index 68753fe08..17635c306 100644 --- a/fs_selfservice/FS-SelfService/cgi/check.html +++ b/fs_selfservice/FS-SelfService/cgi/check.html @@ -1,54 +1,97 @@ <TR> <TD ALIGN="right">Account type</TD> - <TD> - <SELECT NAME="paytype"> - <%= foreach ( @paytypes ) { - $selected = $paytype eq $_ ? ' SELECTED' : ''; - $OUT .= qq(<OPTION$selected VALUE="$_">$_\n); - } %> - </SELECT> + <TD <%= ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') %> > + <%= + if ($ach_read_only) { + $OUT = $paytype . '<INPUT TYPE="hidden" NAME="paytype" VALUE="' . $paytype . '">'; + } else { + $OUT .= '<SELECT NAME="paytype">'; + foreach ( @paytypes ) { + $selected = $paytype eq $_ ? ' SELECTED' : ''; + $OUT .= qq(<OPTION$selected VALUE="$_">$_\n); + } + $OUT .= '</SELECT>'; + } + %> </TD> -</TD><TR> +</TR><TR> <TD ALIGN="right">Account number</TD> - <TD><INPUT TYPE="text" NAME="payinfo1" SIZE=10 MAXLENGTH=20 VALUE="<%=$payinfo1%>"></TD> -</TD><TR> + <TD <%= ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') %> > + <%= if ($ach_read_only) { + $OUT = qq! $payinfo1 <INPUT TYPE="hidden" NAME="payinfo1" VALUE="$payinfo1"> !; + } else { + $OUT = qq! <INPUT TYPE="text" NAME="payinfo1" SIZE=10 MAXLENGTH=20 VALUE="$payinfo1"> !; + } + %> + </TD> +</TR><TR> <TD ALIGN="right">ABA/Routing number</TD> - <TD><INPUT TYPE="text" NAME="payinfo2" SIZE=10 MAXLENGTH=9 VALUE="<%=$payinfo2%>"></TD> + <TD <%= ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') %> > + <%= + if ($ach_read_only) { + $OUT = qq! $payinfo2 <INPUT TYPE="hidden" NAME="payinfo2" VALUE="$payinfo2"> !; + } else { + $OUT = qq! <INPUT TYPE="text" NAME="payinfo2" SIZE=10 MAXLENGTH=20 VALUE="$payinfo2"> !; + } + %> + </TD> </TR><TR> <TD ALIGN="right">Bank name</TD> - <TD><INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="payname" VALUE="<%=$payname%>"></TD> -</TR><TR> + <TD <%= ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') %> > + <%= + if ($ach_read_only) { + $OUT = qq! $payname <INPUT TYPE="hidden" NAME="payname" VALUE="$payname"> !; + } else { + $OUT = qq! <INPUT TYPE="text" NAME="payname" SIZE=10 MAXLENGTH=20 VALUE="$payname"> !; + } + %> + </TD> +</TR> <%= $OUT = ''; if ($show_paystate) { - $OUT .= qq!<TD ALIGN="right">Bank state</TD><TD><SELECT NAME="paystate">!; - for ( @states ) { - $OUT .= '<OPTION'. ($_ eq $paystate ? ' SELECTED' : '' ). ">$_\n"; + $OUT .= '<TR><TD ALIGN="right">Bank state</TD><TD' . ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') . '>'; + if ($ach_read_only) { + $OUT .= qq! $paystate <INPUT TYPE="hidden" NAME="paystate" VALUE="$paystate"> !; + } else { + $OUT .= '<SELECT NAME="paystate">'; + for ( @states ) { + $OUT .= '<OPTION'. ($_ eq $paystate ? ' SELECTED' : '' ). ">$_\n"; + } + $OUT .= '</SELECT>'; } - $OUT .= '</SELECT></TD></TR><TR>'; + $OUT .= '</TD></TR>'; } %> <%= $OUT = ''; if ($show_ss) { - $OUT .= '<TD ALIGN="right">Account holder<BR>Social '; - $OUT .= 'security or tax ID #</TD><TD>'; - $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="ss" VALUE="$ss">!; - $OUT .= '</TD></TR><TR>'; + $OUT .= '<TR><TD ALIGN="right">Account holder<BR>Social '; + $OUT .= 'security or tax ID #</TD><TD' . ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') . '>'; + if ($ach_read_only) { + $OUT .= qq! $ss <INPUT TYPE="hidden" NAME="ss" VALUE="$ss">!; + } else { + $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="ss" VALUE="$ss">!; + } + $OUT .= '</TD></TR>'; } %> <%= $OUT = ''; if ($show_stateid) { - $OUT .= '<TD ALIGN="right">'; - $OUT .= qq!Account holder<BR>$stateid_label</TD><TD>!; - $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="stateid" VALUE="$stateid"></TD>!; - $OUT .= qq!<TD ALIGN="right">$stateid_state_label</TD>!; - $OUT .= '<TD><SELECT NAME="stateid_state">'; - for ( @states ) { - $OUT .= '<OPTION'. ($_ eq $stateid_state ? ' SELECTED' : '' ). ">$_\n"; + $OUT .= qq!<TR><TD ALIGN="right">Account holder<BR>$stateid_label</TD>!; + $OUT .= '<TD' . ($ach_read_only ? ' BGCOLOR="#ffffff"' : '') . '>'; + if ($ach_read_only) { + $OUT .= qq! $stateid <INPUT TYPE="hidden" NAME="stateid" VALUE="$stateid">!; + } else { + $OUT .= qq!<INPUT TYPE="text" SIZE=32 MAXLENGTH=80 NAME="stateid" VALUE="$stateid"></TD>!; + $OUT .= qq!<TD ALIGN="right">$stateid_state_label</TD>!; + $OUT .= '<TD><SELECT NAME="stateid_state">'; + for ( @states ) { + $OUT .= '<OPTION'. ($_ eq $stateid_state ? ' SELECTED' : '' ). ">$_\n"; + } + $OUT .='</SELECT>'; } - $OUT .='</SELECT></TD></TR><TR>'; + $OUT .='</TD></TR>'; } %> -</TR> diff --git a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html index 8c2dfe305..37fd46435 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html @@ -20,24 +20,28 @@ EOF <TR> <TD ALIGN="right">Payment amount</TD> <TD> - <TABLE><TR><TD BGCOLOR="#ffffff"> + <TABLE><TR><TD> <%= $money_char %><INPUT TYPE="text" NAME="amount" SIZE=8 VALUE="<%= ($balance > 0) ? $balance : '' %>"> </TD></TR></TABLE> </TD> </TR> <%= include('discount_term') %> <%= include('check') %> -<TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox" <%= $save_unchecked ? '' : 'CHECKED' %> NAME="save" VALUE="1"> - Remember this information - </TD> -</TR><TR> - <TD COLSPAN=2> - <INPUT TYPE="checkbox"<%= $payby eq 'CHEK' ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this account automatically - </TD> -</TR> + +<%= + $OUT = ''; + if ($ach_read_only) { + if ($payby == 'CHEK') { + $OUT .= '<TR><TD COLSPAN=2><INPUT TYPE="hidden" NAME="auto" VALUE="1"></TD></TR>'; + } + } else { + $OUT .= '<TR><TD COLSPAN=2><INPUT TYPE="checkbox"' . ($save_unchecked ? '' : 'CHECKED ') . 'NAME="save" VALUE="1">'; + $OUT .= 'Remember this information</TD></TR>'; + $OUT .= '<TR><TD COLSPAN=2><INPUT TYPE="checkbox"' . ($payby eq 'CHEK' ? ' CHECKED' : '') . 'NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }">'; + $OUT .= 'Charge future payments to this account automatically</TD></TR>'; + } +%> + </TABLE> <BR> <INPUT TYPE="hidden" NAME="paybatch" VALUE="<%=$paybatch%>"> |