signup page w/advertising source dropdown
authorivan <ivan>
Wed, 10 Dec 2003 23:53:34 +0000 (23:53 +0000)
committerivan <ivan>
Wed, 10 Dec 2003 23:53:34 +0000 (23:53 +0000)
FS/FS/ClientAPI/Signup.pm
fs_signup/FS-SignupClient/cgi/signup.cgi
fs_signup/FS-SignupClient/cgi/signup.html

index 60639b1..375958b 100644 (file)
@@ -40,6 +40,16 @@ sub signup_info {
                  )
       ],
 
                  )
       ],
 
+    'part_referral' =>
+      [
+        map { $_->hashref }
+          qsearch('part_referral',
+                    dbdef->table('part_referral')->column('disabled')
+                      ? { 'disabled' => '' }
+                      : {}
+                 )
+      ],
+
     'agentnum2part_pkg' =>
       {
         map {
     'agentnum2part_pkg' =>
       {
         map {
@@ -72,6 +82,8 @@ sub signup_info {
 
     'countrydefault' => $conf->config('countrydefault') || 'US',
 
 
     'countrydefault' => $conf->config('countrydefault') || 'US',
 
+    'refnum' => $conf->config('signup_server-default_refnum'),
+
   };
 
   if (
   };
 
   if (
index 5ca93d2..8dae9dd 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
 #!/usr/bin/perl -Tw
 #
-# $Id: signup.cgi,v 1.48 2003-10-25 02:05:44 ivan Exp $
+# $Id: signup.cgi,v 1.49 2003-12-10 23:53:34 ivan Exp $
 
 use strict;
 use vars qw( @payby $cgi $locales $packages
 
 use strict;
 use vars qw( @payby $cgi $locales $packages
@@ -10,7 +10,7 @@ use vars qw( @payby $cgi $locales $packages
              $country $zip $daytime $night $fax $invoicing_list $payby $payinfo
              $paycvv $paydate $payname $referral_custnum $init_popstate
              $pkgpart $username $password $password2 $sec_phrase $popnum
              $country $zip $daytime $night $fax $invoicing_list $payby $payinfo
              $paycvv $paydate $payname $referral_custnum $init_popstate
              $pkgpart $username $password $password2 $sec_phrase $popnum
-             $agentnum
+             $agentnum $refnum
              $ieak_file $ieak_template $cck_file $cck_template
              $signup_html $signup_template
              $success_html $success_template
              $ieak_file $ieak_template $cck_file $cck_template
              $signup_html $signup_template
              $success_html $success_template
@@ -218,6 +218,7 @@ if ( defined $cgi->param('magic') ) {
     #$agentnum, #         = $cgi->param('agentnum'),
     $agentnum         ||= $cgi->param('agentnum');
     $init_popstate    = $cgi->param('init_popstate');
     #$agentnum, #         = $cgi->param('agentnum'),
     $agentnum         ||= $cgi->param('agentnum');
     $init_popstate    = $cgi->param('init_popstate');
+    $refnum           = $cgi->param('refnum');
 
     if ( $cgi->param('_password') ne $cgi->param('_password2') ) {
       $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat
 
     if ( $cgi->param('_password') ne $cgi->param('_password2') ) {
       $error = $init_data->{msgcat}{passwords_dont_match}; #msgcat
@@ -266,6 +267,7 @@ if ( defined $cgi->param('magic') ) {
         '_password'        => $password,
         'popnum'           => $popnum,
         'agentnum'         => $agentnum,
         '_password'        => $password,
         'popnum'           => $popnum,
         'agentnum'         => $agentnum,
+        'refnum'           => $refnum,
         map { $_ => $cgi->param($_) } grep { /^snarf_/ } $cgi->param
       } );
 
         map { $_ => $cgi->param($_) } grep { /^snarf_/ } $cgi->param
       } );
 
@@ -314,6 +316,7 @@ if ( defined $cgi->param('magic') ) {
   $popnum = '';
   $referral_custnum = $cgi->param('ref') || '';
   $init_popstate = $cgi->param('init_popstate') || '';
   $popnum = '';
   $referral_custnum = $cgi->param('ref') || '';
   $init_popstate = $cgi->param('init_popstate') || '';
+  $refnum = $init_data->{'refnum'};
   print_form;
 }
 
   print_form;
 }
 
index dc4252c..96bdac6 100755 (executable)
 <INPUT TYPE="hidden" NAME="magic" VALUE="process">
 <INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>">
 <INPUT TYPE="hidden" NAME="ss" VALUE="">
 <INPUT TYPE="hidden" NAME="magic" VALUE="process">
 <INPUT TYPE="hidden" NAME="ref" VALUE="<%= $referral_custnum %>">
 <INPUT TYPE="hidden" NAME="ss" VALUE="">
+Where did you hear about our service? <SELECT NAME="refnum">
+<%=
+  $OUT .= '<OPTION VALUE="">' unless $refnum;
+  foreach my $part_referral ( @{$init_data->{'part_referral'}} ) {
+    $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"';
+    $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum;
+    $OUT .= '>'. $part_referral->{'referral'};
+  }
+%>
+</SELECT><BR><BR>
 Contact Information
 <TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%">
 <TR>
 Contact Information
 <TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=0 WIDTH="100%">
 <TR>