From a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 18 Jul 2023 12:05:33 -0700 Subject: [PATCH] v3: prevent CARD/CHEK customers from inadvertantly going off auto-pay making an early manual payment, RT#87429 --- .../FS-SelfService/cgi/make_ach_payment.html | 39 ++++++++++++++++-- .../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 1183b2ba0..8b5908ef0 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 .= ''; } } else { - $OUT .= ''; - $OUT .= 'Remember this information'; - $OUT .= ''; - $OUT .= 'Charge future payments to this account automatically'; + + my $save_ck = $save_unchecked ? '' : 'CHECKED'; + my $auto_ck = $payby eq 'CHEK' ? ' CHECKED' : ''; + + if ( $payby eq 'CHEK' && ! $save_unchecked ) { + + $OUT .=< + + + + Remember this information, and charge future payments to this account automatically + + +EOF + + } else { + + $OUT .=< + + + Remember this information + + + + + Charge future payments to this account automatically + + +EOF + + } + } + %> diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html index 503901edd..b14c901fd 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html @@ -35,17 +35,43 @@ EOF <%= include('card') %> - - - NAME="save" VALUE="1"> - Remember this card and billing address - - - - NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this card automatically - - + +<%= + +my $save_ck = $save_unchecked ? '' : 'CHECKED'; +my $auto_ck = $payby eq 'CARD' ? ' CHECKED' : ''; + +if ( $payby eq 'CARD' && ! $save_unchecked ) { + + $OUT .=< + + + + Remember this card and billing address, and charge future payments to this card automatically + + +EOF + +} else { + + $OUT .=< + + + Remember this card and billing address + + + + + Charge future payments to this card automatically + + +EOF + +} +%> +
-- 2.11.0