[freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi signup.cgi, 1.17, 1.18 signup.html, 1.22, 1.23

Ivan,,, ivan at wavetail.420.am
Fri Jul 15 14:10:08 PDT 2011


Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi
In directory wavetail.420.am:/tmp/cvs-serv5168/fs_selfservice/FS-SelfService/cgi

Modified Files:
	signup.cgi signup.html 
Log Message:
add signup-duplicate_cc-warn_hours to warn about duplicate signups in a time span, RT#12011

Index: signup.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/signup.html,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -w -d -r1.22 -r1.23
--- signup.html	31 Dec 2010 01:23:28 -0000	1.22
+++ signup.html	15 Jul 2011 21:10:06 -0000	1.23
@@ -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;

Index: signup.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/signup.cgi,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -w -d -r1.17 -r1.18
--- signup.cgi	31 Dec 2010 01:23:27 -0000	1.17
+++ signup.cgi	15 Jul 2011 21:10:06 -0000	1.18
@@ -229,6 +229,7 @@
 
                 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 @@
         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 @@
 
 sub print_form {
 
-  $error = "Error: $error" if $error;
+  $error = "Error: $error" if $error && $error !~ /^Warning:/i;
 
   my $r = {
     $cgi->Vars,



More information about the freeside-commits mailing list