summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-12-10 23:53:34 +0000
committerivan <ivan>2003-12-10 23:53:34 +0000
commite58b9fa1cdf0693f29d0d3db9c861cf4ecd7a77c (patch)
treefd1d3817089ca47349757f7496470915ea2dc0e7
parenta5bc5bcbadafe55b31d9e97fccb6122477e390fb (diff)
signup page w/advertising source dropdown
-rw-r--r--FS/FS/ClientAPI/Signup.pm12
-rwxr-xr-xfs_signup/FS-SignupClient/cgi/signup.cgi7
-rwxr-xr-xfs_signup/FS-SignupClient/cgi/signup.html10
3 files changed, 27 insertions, 2 deletions
diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm
index 60639b132..375958b9c 100644
--- a/FS/FS/ClientAPI/Signup.pm
+++ b/FS/FS/ClientAPI/Signup.pm
@@ -40,6 +40,16 @@ sub signup_info {
)
],
+ 'part_referral' =>
+ [
+ map { $_->hashref }
+ qsearch('part_referral',
+ dbdef->table('part_referral')->column('disabled')
+ ? { 'disabled' => '' }
+ : {}
+ )
+ ],
+
'agentnum2part_pkg' =>
{
map {
@@ -72,6 +82,8 @@ sub signup_info {
'countrydefault' => $conf->config('countrydefault') || 'US',
+ 'refnum' => $conf->config('signup_server-default_refnum'),
+
};
if (
diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi
index 5ca93d289..8dae9dd12 100755
--- a/fs_signup/FS-SignupClient/cgi/signup.cgi
+++ b/fs_signup/FS-SignupClient/cgi/signup.cgi
@@ -1,6 +1,6 @@
#!/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
@@ -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
- $agentnum
+ $agentnum $refnum
$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');
+ $refnum = $cgi->param('refnum');
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,
+ 'refnum' => $refnum,
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') || '';
+ $refnum = $init_data->{'refnum'};
print_form;
}
diff --git a/fs_signup/FS-SignupClient/cgi/signup.html b/fs_signup/FS-SignupClient/cgi/signup.html
index dc4252c73..96bdac666 100755
--- a/fs_signup/FS-SignupClient/cgi/signup.html
+++ b/fs_signup/FS-SignupClient/cgi/signup.html
@@ -18,6 +18,16 @@
<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>