[freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi signup.cgi, 1.15.4.2, 1.15.4.3 signup.html, 1.21.2.1, 1.21.2.2

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


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

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	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.21.2.1
retrieving revision 1.21.2.2
diff -u -w -d -r1.21.2.1 -r1.21.2.2
--- signup.html	31 Dec 2010 01:23:34 -0000	1.21.2.1
+++ signup.html	15 Jul 2011 21:10:20 -0000	1.21.2.2
@@ -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.15.4.2
retrieving revision 1.15.4.3
diff -u -w -d -r1.15.4.2 -r1.15.4.3
--- signup.cgi	31 Dec 2010 01:23:34 -0000	1.15.4.2
+++ signup.cgi	15 Jul 2011 21:10:20 -0000	1.15.4.3
@@ -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