diff options
author | ivan <ivan> | 2011-07-15 21:10:40 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-07-15 21:10:40 +0000 |
commit | 0e7c29b192fff137d3b9167b29633a94f94b995f (patch) | |
tree | 7bf403bd486c7266d533c1f5d7af0bdb80eb07d3 /fs_selfservice | |
parent | 945580551410383965a86beadb095a760fa4ce5b (diff) |
add signup-duplicate_cc-warn_hours to warn about duplicate signups in a time span, RT#12011
Diffstat (limited to 'fs_selfservice')
-rwxr-xr-x | fs_selfservice/FS-SelfService/cgi/signup.cgi | 12 | ||||
-rwxr-xr-x | fs_selfservice/FS-SelfService/cgi/signup.html | 8 |
2 files changed, 19 insertions, 1 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/signup.cgi b/fs_selfservice/FS-SelfService/cgi/signup.cgi index 200161404..5c9d11c01 100755 --- a/fs_selfservice/FS-SelfService/cgi/signup.cgi +++ b/fs_selfservice/FS-SelfService/cgi/signup.cgi @@ -229,6 +229,7 @@ if ( $magic eq 'process' || $action eq 'process_signup' ) { payby payinfo paycvv paydate payname paystate paytype invoicing_list referral_custnum promo_code reg_code + override_ban_warn pkgpart refnum agentnum username sec_phrase _password popnum mac_addr @@ -249,10 +250,19 @@ if ( $magic eq 'process' || $action eq 'process_signup' ) { qw( popup_url reference amount ); print_collect($rv); } elsif ( $error ) { + #fudge the snarf info no strict 'refs'; ${$_} = $cgi->param($_) foreach grep { /^snarf_/ } $cgi->param; + + if ( $error =~ /^_duplicate_(card|ach)$/ ) { + my $what = ($1 eq 'card') ? 'Credit card' : 'Electronic check'; + $error = "Warning: $what already used to sign up recently"; + $init_data->{'override_ban_warn'} = 1; + } + print_form(); + } else { print_okay( 'pkgpart' => scalar($cgi->param('pkgpart')), @@ -277,7 +287,7 @@ if ( $magic eq 'process' || $action eq 'process_signup' ) { sub print_form { - $error = "Error: $error" if $error; + $error = "Error: $error" if $error && $error !~ /^Warning:/i; my $r = { $cgi->Vars, diff --git a/fs_selfservice/FS-SelfService/cgi/signup.html b/fs_selfservice/FS-SelfService/cgi/signup.html index 405444cfa..8204f5502 100755 --- a/fs_selfservice/FS-SelfService/cgi/signup.html +++ b/fs_selfservice/FS-SelfService/cgi/signup.html @@ -43,6 +43,14 @@ $OUT = join("\n", map { qq|<input type="hidden" name="$_" />| } qw / promo_code reg_code pkgpart username _password _password2 sec_phrase popnum mac_addr countrycode phonenum sip_password pin / ); %> +<%= + if ($override_ban_warn) { + $OUT .= 'Are you sure you want to sign up again? <SELECT NAME="override_ban_warn"><OPTION VALUE="0">No<OPTION VALUE="1">Yes</SELECT><BR><BR>'; + } else { + $OUT .= ''; + } +%> + Where did you hear about our service? <SELECT NAME="refnum"> <%= $OUT .= '<OPTION VALUE="">' unless $refnum; |