diff options
Diffstat (limited to 'fs_signup/FS-SignupClient')
| -rw-r--r-- | fs_signup/FS-SignupClient/SignupClient.pm | 14 | ||||
| -rwxr-xr-x | fs_signup/FS-SignupClient/cgi/signup.cgi | 25 | ||||
| -rwxr-xr-x | fs_signup/FS-SignupClient/cgi/signup.html | 13 | 
3 files changed, 38 insertions, 14 deletions
| diff --git a/fs_signup/FS-SignupClient/SignupClient.pm b/fs_signup/FS-SignupClient/SignupClient.pm index 3933703ae..7c9d46d9e 100644 --- a/fs_signup/FS-SignupClient/SignupClient.pm +++ b/fs_signup/FS-SignupClient/SignupClient.pm @@ -8,7 +8,7 @@ use FileHandle;  use IO::Handle;  use Storable qw(nstore_fd fd_retrieve); -$VERSION = '0.02'; +$VERSION = '0.03';  @ISA = qw( Exporter );  @EXPORT_OK = qw( signup_info new_customer ); @@ -98,6 +98,8 @@ Each hash reference has the following keys:    ac    exch +(Future expansion: fourth argument is the $init_data hash reference) +  =cut  sub signup_info { @@ -141,6 +143,7 @@ a paramater with the following keys:    pkgpart    username    _password +  sec_phrase    popnum  Returns a scalar error message, or the empty string for success. @@ -150,12 +153,6 @@ Returns a scalar error message, or the empty string for success.  sub new_customer {    my $hashref = shift; -  #things that aren't necessary in base class, but are for signup server -#  return "Passwords don't match" -#    if $hashref->{'_password'} ne $hashref->{'_password2'} -  return "Empty password" unless $hashref->{'_password'}; -  return "No POP selected" unless $hashref->{'popnum'}; -    socket(SOCK, PF_UNIX, SOCK_STREAM, 0) or die "socket: $!";    connect(SOCK, sockaddr_un($fs_signupd_socket)) or die "connect: $!";    print SOCK "new_customer\n"; @@ -163,10 +160,9 @@ sub new_customer {    my $signup_data = { map { $_ => $hashref->{$_} } qw(      first last ss company address1 address2 city county state zip country      daytime night fax payby payinfo paydate payname invoicing_list -    referral_custnum pkgpart username _password popnum +    referral_custnum pkgpart username _password sec_phrase popnum    ) }; -  #    nstore_fd($signup_data, \*SOCK) or die "can't send customer signup: $!";    SOCK->flush; diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index d44782f9c..0b2370aa6 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.cgi +++ b/fs_signup/FS-SignupClient/cgi/signup.cgi @@ -1,13 +1,13 @@  #!/usr/bin/perl -Tw  # -# $Id: signup.cgi,v 1.16 2002-04-06 20:37:38 ivan Exp $ +# $Id: signup.cgi,v 1.17 2002-04-06 21:39:22 ivan Exp $  use strict; -use vars qw( @payby $cgi $locales $packages $pops $error +use vars qw( @payby $cgi $locales $packages $pops $init_data $error               $last $first $ss $company $address1 $address2 $city $state $county               $country $zip $daytime $night $fax $invoicing_list $payby $payinfo               $paydate $payname $referral_custnum -             $pkgpart $username $password $password2 $popnum +             $pkgpart $username $password $password2 $sec_phrase $popnum               $ieak_file $ieak_template $cck_file $cck_template               $signup_html $signup_template $success_html $success_template               $ac $exch $loc @@ -17,7 +17,7 @@ use subs qw( print_form print_okay expselect signup_default success_default );  use CGI;  use CGI::Carp qw(fatalsToBrowser);  use HTTP::Headers::UserAgent 2.00; -use FS::SignupClient 0.02 qw( signup_info new_customer ); +use FS::SignupClient 0.03 qw( signup_info new_customer );  use Text::Template;  #acceptable payment methods @@ -90,7 +90,7 @@ if ( -e $success_html ) {      or die $Text::Template::ERROR;  } -( $locales, $packages, $pops ) = signup_info(); +( $locales, $packages, $pops, $init_data ) = signup_info();  $cgi = new CGI; @@ -147,6 +147,7 @@ if ( defined $cgi->param('magic') ) {          'referral_custnum' => $referral_custnum = $cgi->param('ref'),          'pkgpart'          => $pkgpart          = $cgi->param('pkgpart'),          'username'         => $username         = $cgi->param('username'), +        'sec_phrase'       => $sec_phrase       = $cgi->param('sec_phrase'),          '_password'        => $password         = $cgi->param('_password'),          'popnum'           => $popnum           = $cgi->param('popnum'),        } ); @@ -187,6 +188,7 @@ if ( defined $cgi->param('magic') ) {    $username = '';    $password = '';    $password2 = ''; +  $sec_phrase = '';    $popnum = '';    $referral_custnum = $cgi->param('ref') || '';    print_form; @@ -485,6 +487,19 @@ Contact Information    <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>">    </TD>  </TR> +<%= +  if ( $init_data->{'security_phrase'} ) { +    $OUT .= <<ENDOUT; +<TR> +  <TD ALIGN="right">Security Phrase</TD> +  <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> +  </TD> +</TR> +ENDOUT +  } else { +    $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; +  } +%>  <TR>    <TD ALIGN="right">Access number</TD>    <TD><%= popselector($popnum) %></TD> diff --git a/fs_signup/FS-SignupClient/cgi/signup.html b/fs_signup/FS-SignupClient/cgi/signup.html index 909d1fe5b..b97511e97 100755 --- a/fs_signup/FS-SignupClient/cgi/signup.html +++ b/fs_signup/FS-SignupClient/cgi/signup.html @@ -134,6 +134,19 @@ Contact Information    <TD><INPUT TYPE="password" NAME="_password2" VALUE="<%= $password2 %>">    </TD>  </TR> +<%= +  if ( $init_data->{'security_phrase'} ) { +    $OUT .= <<ENDOUT; +<TR> +  <TD ALIGN="right">Security Phrase</TD> +  <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase"> +  </TD> +</TR> +ENDOUT +  } else { +    $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">'; +  } +%>  <TR>    <TD ALIGN="right">Access number</TD>    <TD><%= popselector($popnum) %></TD> | 
