From eb8fe191d66b2b6bf7e113049047968c8147fb66 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 10 Jul 2017 09:52:54 -0400 Subject: RT# 74537 - Added new selfservice config option to make ECHECK readonly on selfservice, updated selfservice and NGselfservice to look for this option --- fs_selfservice/FS-SelfService/cgi/change_pay.html | 8 ++ fs_selfservice/FS-SelfService/cgi/check.html | 103 +++++++++++++++------ .../FS-SelfService/cgi/make_ach_payment.html | 28 +++--- 3 files changed, 97 insertions(+), 42 deletions(-) (limited to 'fs_selfservice') 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 @@ Account type - - + > + <%= + if ($ach_read_only) { + $OUT = $paytype . ''; + } else { + $OUT .= ''; + } + %> - + Account number - - + > + <%= if ($ach_read_only) { + $OUT = qq! $payinfo1 !; + } else { + $OUT = qq! !; + } + %> + + ABA/Routing number - + > + <%= + if ($ach_read_only) { + $OUT = qq! $payinfo2 !; + } else { + $OUT = qq! !; + } + %> + Bank name - - + > + <%= + if ($ach_read_only) { + $OUT = qq! $payname !; + } else { + $OUT = qq! !; + } + %> + + <%= $OUT = ''; if ($show_paystate) { - $OUT .= qq!Bank state !; + } else { + $OUT .= ''; } - $OUT .= ''; + $OUT .= ''; } %> <%= $OUT = ''; if ($show_ss) { - $OUT .= 'Account holder
Social '; - $OUT .= 'security or tax ID #'; - $OUT .= qq!!; - $OUT .= ''; + $OUT .= 'Account holder
Social '; + $OUT .= 'security or tax ID #'; + if ($ach_read_only) { + $OUT .= qq! $ss !; + } else { + $OUT .= qq!!; + } + $OUT .= ''; } %> <%= $OUT = ''; if ($show_stateid) { - $OUT .= ''; - $OUT .= qq!Account holder
$stateid_label!; - $OUT .= qq!!; - $OUT .= qq!$stateid_state_label!; - $OUT .= '!; + } else { + $OUT .= qq!!; + $OUT .= qq!$stateid_state_label!; + $OUT .= ''; } - $OUT .=''; + $OUT .=''; } %> - 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 Payment amount - <%= include('discount_term') %> <%= include('check') %> - - - - - + +<%= + $OUT = ''; + if ($ach_read_only) { + if ($payby == 'CHEK') { + $OUT .= ''; + } + } else { + $OUT .= ''; + $OUT .= ''; + } +%> +
+
<%= $money_char %>
- NAME="save" VALUE="1"> - Remember this information -
- NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this account automatically -
'; + $OUT .= 'Remember this information
'; + $OUT .= 'Charge future payments to this account automatically

-- cgit v1.2.1