diff options
author | Ivan Kohler <ivan@freeside.biz> | 2023-07-18 12:05:33 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2023-07-18 12:05:33 -0700 |
commit | a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 (patch) | |
tree | c3082a8195b2a9734c823c2b222c502862c2aaba | |
parent | 06c319d7acbb4d469c985a83965f340d7435da65 (diff) |
v3: prevent CARD/CHEK customers from inadvertantly going off auto-pay making an early manual payment, RT#87429FREESIDE_3_BRANCH
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/make_ach_payment.html | 39 | ||||
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/make_payment.html | 48 |
2 files changed, 72 insertions, 15 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html index 1183b2b..8b5908e 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html @@ -35,11 +35,42 @@ EOF $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>'; + + my $save_ck = $save_unchecked ? '' : 'CHECKED'; + my $auto_ck = $payby eq 'CHEK' ? ' CHECKED' : ''; + + if ( $payby eq 'CHEK' && ! $save_unchecked ) { + + $OUT .=<<EOF; + <TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1" STYLE="display:none"> + <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; } else { document.OneTrueForm.save.checked=false; }"> + Remember this information, and charge future payments to this account automatically + </TD> + </TR> +EOF + + } else { + + $OUT .=<<EOF; + <TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1"> + Remember this information + </TD> + </TR><TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> + Charge future payments to this account automatically + </TD> + </TR> +EOF + + } + } + %> </TABLE> diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html index 503901e..b14c901 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html @@ -35,17 +35,43 @@ EOF </TD> </TR> <%= include('card') %> -<TR> - <TD COLSPAN=8> - <INPUT TYPE="checkbox" <%= $save_unchecked ? '' : 'CHECKED' %> NAME="save" VALUE="1"> - Remember this card and billing address - </TD> -</TR><TR> - <TD COLSPAN=8> - <INPUT TYPE="checkbox"<%= $payby eq 'CARD' ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this card automatically - </TD> -</TR> + +<%= + +my $save_ck = $save_unchecked ? '' : 'CHECKED'; +my $auto_ck = $payby eq 'CARD' ? ' CHECKED' : ''; + +if ( $payby eq 'CARD' && ! $save_unchecked ) { + + $OUT .=<<EOF; + <TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1" STYLE="display:none"> + <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; } else { document.OneTrueForm.save.checked=false; }"> + Remember this card and billing address, and charge future payments to this card automatically + </TD> + </TR> +EOF + +} else { + + $OUT .=<<EOF; + <TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $save_ck NAME="save" VALUE="1"> + Remember this card and billing address + </TD> + </TR><TR> + <TD COLSPAN=8> + <INPUT TYPE="checkbox" $auto_ck NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> + Charge future payments to this card automatically + </TD> + </TR> +EOF + +} +%> + </TABLE> <BR> <INPUT TYPE="hidden" NAME="payunique" VALUE="<%=$payunique%>"> |