From: ivan Date: Mon, 29 Sep 2003 06:51:24 +0000 (+0000) Subject: signup with agent selection X-Git-Tag: NET_WHOIS_RAW_0_31~363 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ce0cb6c1b8d51cc9bb27fe9685bcccab5d8e25fb signup with agent selection --- diff --git a/FS/FS/ClientAPI/Signup.pm b/FS/FS/ClientAPI/Signup.pm index 36045d9e2..5ca1f93ed 100644 --- a/FS/FS/ClientAPI/Signup.pm +++ b/FS/FS/ClientAPI/Signup.pm @@ -3,7 +3,7 @@ package FS::ClientAPI::Signup; use strict; use Tie::RefHash; use FS::Conf; -use FS::Record qw(qsearch qsearchs); +use FS::Record qw(qsearch qsearchs dbdef); use FS::agent; use FS::cust_main_county; use FS::part_pkg; @@ -29,6 +29,15 @@ sub signup_info { 'cust_main_county' => [ map { $_->hashref } qsearch('cust_main_county', {}) ], + 'agent' => + [ + map { $_->hashref } + qsearch('agent', dbdef->table('agent')->column('disabled') + ? { 'disabled' => '' } + : {} + ) + ], + 'agentnum2part_pkg' => { map { @@ -39,7 +48,10 @@ sub signup_info { grep { $_->svcpart('svc_acct') && $href->{ $_->pkgpart } } qsearch( 'part_pkg', { 'disabled' => '' } ) ]; - } qsearch('agent', {} ) + } qsearch('agent', dbdef->table('agent')->column('disabled') + ? { 'disabled' => '' } + : {} + ) }, 'svc_acct_pop' => [ map { $_->hashref } qsearch('svc_acct_pop',{} ) ], diff --git a/fs_signup/FS-SignupClient/cgi/signup-agentselect.html b/fs_signup/FS-SignupClient/cgi/signup-agentselect.html new file mode 100755 index 000000000..24513611f --- /dev/null +++ b/fs_signup/FS-SignupClient/cgi/signup-agentselect.html @@ -0,0 +1,195 @@ +ISP Signup form +ISP Signup form

+<%= $error %> +
+ + + +Agent

+Contact Information + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
*Contact name
(last, first)
, +
Company
*Address
 
*City*State/Country + <%= + ($county_html, $state_html, $country_html) = + regionselector( $county, $state, $country ); + + "$county_html $state_html"; + %> + *Zip
*Country<%= $country_html %>
Day Phone
Night Phone
Fax
* required fields
+
Billing information + + +<%= scalar(@payby) > 1 ? '' : '' %> +
+ + <%= + $OUT .= ' + + Postal mail invoice +
Email invoice +
Billing type
+ + + + <%= + + my $cardselect = ''; + + my %payby = ( + 'CARD' => qq!Credit card
*$cardselect
*Exp !. expselect("CARD"). qq!
*Name on card
!, + 'DCRD' => qq!Credit card
*$cardselect
*Exp !. expselect("DCRD"). qq!
*Name on card
!, + 'CHEK' => qq!Electronic check
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'DCHK' => qq!Electronic check
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'LECB' => qq!Phone bill billing
${r}Phone number !, + 'BILL' => qq!Billing
P.O.
*Exp !. expselect("BILL", "12-2037"). qq!
*Attention
!, + 'COMP' => qq!Complimentary
*Approved by
*Exp !. expselect("COMP"), + 'PREPAY' => qq!Prepaid card
*!, + ); + + my( $account, $aba ) = split('@', $payinfo); + my %paybychecked = ( + 'CARD' => qq!Credit card
*$cardselect
*Exp !. expselect("CARD", $paydate). qq!
*Name on card
!, + 'DCRD' => qq!Credit card
*$cardselect
*Exp !. expselect("DCRD", $paydate). qq!
*Name on card
!, + 'CHEK' => qq!Electronic check
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'DCHK' => qq!Electronic check
${r}Account number
${r}ABA/Routing code
${r}Bank name !, + 'LECB' => qq!Phone bill billing
${r}Phone number !, + 'BILL' => qq!Billing
P.O.
*Exp !. expselect("BILL", $paydate). qq!
*Attention
!, + 'COMP' => qq!Complimentary
*Approved by
*Exp !. expselect("COMP", $paydate), + 'PREPAY' => qq!Prepaid card
*!, + ); + + for (@payby) { + if ( scalar(@payby) == 1) { + $OUT .= '"; + } else { + $OUT .= qq!!; + } else { + $OUT .= qq!> $payby{$_}!; + } + + } + } + %> + +
'. + qq!!. + "$paybychecked{$_} $paybychecked{$_}
* required fields for each billing type +

First package + + + + + + + + + + + + + + + + +<%= + if ( $init_data->{'security_phrase'} ) { + $OUT .= < + + + +ENDOUT + } else { + $OUT .= ''; + } +%> +<%= + if ( scalar(@$pops) ) { + $OUT .= ''; + } else { + $OUT .= popselector($popnum); + } +%> +
Username
Password
Re-enter Password
Security Phrase +
Access number'. + popselector($popnum). '
+

+
diff --git a/fs_signup/FS-SignupClient/cgi/signup.cgi b/fs_signup/FS-SignupClient/cgi/signup.cgi index 78f31aa28..6fa01deaf 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.44 2003-09-29 06:22:18 ivan Exp $ +# $Id: signup.cgi,v 1.45 2003-09-29 06:51:24 ivan Exp $ use strict; use vars qw( @payby $cgi $locales $packages @@ -213,6 +213,7 @@ if ( defined $cgi->param('magic') ) { $password = $cgi->param('_password'); $popnum = $cgi->param('popnum'); #$agentnum, # = $cgi->param('agentnum'), + $agentnum ||= $cgi->param('agentnum'); $init_popstate = $cgi->param('init_popstate'); if ( $cgi->param('_password') ne $cgi->param('_password2') ) {