1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <TITLE><%= $agent || ( $signup_service eq 'svc_phone' ? 'ITSP' : 'ISP' ) %> Signup form</TITLE>
7 <BODY BGCOLOR="<%= $body_bgcolor || '#e8e8e8' %>" onUnload="myclose()">
8 <%= if ( $terms_of_service =~ /\S/ ) { # enable overlib
9 $OUT .= qq!<SCRIPT type="text/javascript" src="$_.js"></SCRIPT>\n!
10 foreach (qw(overlibmws overlibmws_iframe overlibmws_draggable
11 overlibmws_crossframe iframecontentmws ));
14 <script type="text/javascript">
16 function myopen(filename,windowname,properties) {
18 mywindow = window.open(filename,windowname,properties);
27 <%= $OUT .= $body_header
29 ( $agent || ( $signup_service eq 'svc_phone' ? 'ITSP' : 'ISP' ) ).
30 ' Signup form</FONT><BR><BR>';
34 $OUT .= '<FONT SIZE="+1" COLOR="#ff0000">'. encode_entities($error).
39 <FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true" STYLE="margin:0">
40 <INPUT TYPE="hidden" NAME="prepaid_shortform" VALUE="<%= encode_entities($prepaid_shortform) %>">
41 <INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>">
42 <INPUT TYPE="hidden" NAME="action" VALUE="process_signup">
43 <INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agentnum %>">
44 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<%= $referral_custnum %>">
45 <INPUT TYPE="hidden" NAME="ss" VALUE="">
46 <input type="hidden" name="payby">
51 map { qq|<input type="hidden" name="${method}_$_" />| }
52 qw( payinfo payinfo1 payinfo2 payname paystate paytype paycvv
60 map { qq|<input type="hidden" name="$_" />| }
61 qw( promo_code reg_code pkgpart username _password _password2
62 sec_phrase popnum domsvc mac_addr countrycode phonenum
64 map { ( "tax_$_", "tax_${_}_num" ) } @exempt_groups
69 if ($override_ban_warn) {
70 $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>';
76 Where did you hear about our service? <SELECT NAME="refnum">
78 $OUT .= '<OPTION VALUE="">' unless $refnum;
79 foreach my $part_referral ( @part_referral ) {
80 $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"';
81 $OUT .= ' SELECTED' if $part_referral->{'refnum'} == $refnum;
82 $OUT .= '>'. $part_referral->{'referral'};
87 <%= unless ( $prepaid_template_custnum && $prepaid_shortform ) {
89 my $bgcolor = $box_bgcolor || '#c0c0c0';
91 <FONT SIZE="+1"><B>Contact Information</B></FONT>
92 <TABLE BGCOLOR="$bgcolor" BORDER=0 CELLSPACING=0 WIDTH="100%">
94 <TH ALIGN="right"><font color="#ff0000">*</font>Contact name<BR>(last, first)</TH>
95 <TD COLSPAN=5><INPUT TYPE="text" NAME="last" VALUE="$last">,
96 <INPUT TYPE="text" NAME="first" VALUE="$first"></TD>
99 <TD ALIGN="right">Company</TD>
100 <TD COLSPAN=5><INPUT TYPE="text" NAME="company" SIZE=70 VALUE="$company"></TD>
103 <TH ALIGN="right"><font color="#ff0000">*</font>Address</TH>
104 <TD COLSPAN=5><INPUT TYPE="text" NAME="address1" SIZE=70 VALUE="$address1"></TD>
107 <TD ALIGN="right"> </TD>
108 <TD COLSPAN=5><INPUT TYPE="text" NAME="address2" SIZE=70 VALUE="$address2"></TD>
111 <TH ALIGN="right"><font color="#ff0000">*</font>City</TH>
112 <TD><INPUT TYPE="text" NAME="city" VALUE="$city"></TD> !;
114 my ($county_html, $state_html, $country_html) =
116 selected_county => $county,
117 selected_state => $state,
118 selected_country => $country,
119 default_state => $statedefault,
120 default_country => $countrydefault,
121 locales => \@cust_main_county,
124 $county_out = ($county_html =~ /SELECT/) ? 'County/State' : 'State';
125 $OUT .= qq!<TH ALIGN="right"><font color="#ff0000">*</font> $county_out </TH>
127 $county_html $state_html
129 <TH><font color="#ff0000">*</font>Zip</TH>
130 <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="$zip"></TD>
133 <TH ALIGN="right"><font color="#ff0000">*</font>Country</TH>
134 <TD>$country_html</TD>
136 <TD ALIGN="right">Day Phone</TD>
137 <TD COLSPAN=5><INPUT TYPE="text" NAME="daytime" VALUE="$daytime" SIZE=18></TD>
140 <TD ALIGN="right">Night Phone</TD>
141 <TD COLSPAN=5><INPUT TYPE="text" NAME="night" VALUE="$night" SIZE=18></TD>
144 <TD ALIGN="right">Fax</TD>
145 <TD COLSPAN=5><INPUT TYPE="text" NAME="fax" VALUE="$fax" SIZE=12></TD>
148 if ( $stateid_enabled ) {
149 my ($county_html, $state_html, $country_html) =
151 prefix => 'stateid_',
152 default_state => $statedefault,
153 default_country => $countrydefault,
154 locales => \@cust_main_county,
156 $OUT .= qq!<TR><TD ALIGN="right">!. $label{stateid}.'</TD>';
157 $OUT .= qq!<TD><INPUT TYPE="text" NAME="stateid" VALUE="$stateid" SIZE=12></TD>!;
158 $OUT .= qq!<TD ALIGN="right">!. $label{stateid_state} .'</TD>';
159 $OUT .="<TD COLSPAN=3>$county_html $state_html</TD></TR>";
162 </TABLE><font color="#ff0000">*</font> required fields<BR>
172 <BR><FONT SIZE="+1"><B>Billing information</B></FONT>
173 <TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">
178 unless ( $emailinvoiceonly ) {
179 $OUT .= '<INPUT TYPE="checkbox" NAME="invoicing_list_POST" VALUE="POST"';
180 my @invoicing_list = split(', ', $invoicing_list );
182 if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list;
183 $OUT .= '> Postal mail invoice'; }
188 <TR><TD><%= $OUT = ( $emailinvoiceonly ? q|<font color="#ff0000">*</font>| : q|| ) %> Email invoice <INPUT TYPE="text" NAME="invoicing_list" VALUE="<%= join(', ', grep { $_ ne 'POST' } split(', ', $invoicing_list ) ) %>">
190 <%= ( scalar(@payby) > 1 or 1 ) ? '<TR><TD>Billing type ' : '' %>
192 <TABLE BGCOLOR="#c0c0c0" BORDER=1 WIDTH="100%">
197 my $cardselect = '<SELECT NAME="CARD_type"><OPTION></OPTION>';
198 foreach ( keys %card_types ) {
199 $selected = $CARD_type eq $card_types{$_} ? 'SELECTED' : '';
200 $cardselect .= qq!<OPTION $selected VALUE="$card_types{$_}">$_</OPTION>!;
202 $cardselect .= '</SELECT>';
204 my $table = '<TABLE BGCOLOR="'. ( $box_bgcolor || '#c0c0c0' ). '" BORDER=0 CELLSPACING=0 WIDTH="100%">';
207 'CARD' => qq!$table<TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expiration</TD><TD>!. expselect("CARD"). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname"></TD></TR>!,
208 'DCRD' => qq!$table<TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expiration</TD><TD>!. expselect("DCRD"). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname"></TD></TR>!,
209 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="" MAXLENGTH=10><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>{$r}Bank State <INPUT TYPE="text" NAME="CHEK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="">!,
210 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_">$_</OPTION>!} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="" SIZE=10 MAXLENGTH=9><BR>{$r}Bank State <INPUT TYPE="text" NAME="DCHK_paystate" VALUE="" SIZE=5 MAXLENGTH=4><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!,
211 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" NAME="LECB_payinfo" VALUE="" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!,
212 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE=""><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<INPUT TYPE="text" NAME="BILL_payname" VALUE="Accounts Payable">!,
213 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE=""><BR><font color="#ff0000">*</font>Exp !. expselect("COMP"),
214 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="" MAXLENGTH=80>!,
217 if ( $cvv_enabled ) {
218 foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
219 my $cvv_r = $require_cvv ? '<font color="#ff0000">*</font> ' : '';
220 $payby{$payby} .= qq!<TR><TD ALIGN="right">${cvv_r}CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="" SIZE=4 MAXLENGTH=4></TD></TR>!;
223 if ( $paystate_enabled ) {
224 foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) {
225 my ($county_html, $state_html, $country_html) =
227 prefix => "${payby}_pay",
228 default_state => $statedefault,
229 default_country => $countrydefault,
230 locales => \@cust_main_county,
232 $payby{$payby} .= "<BR>${r}Bank state $county_html $state_html";
236 my( $account, $aba ) = split('@', $payinfo);
238 'CARD' => qq!$table<TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="CARD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expiration</TD><TD>!. expselect("CARD", $paydate). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="CARD_payname" VALUE="$payname"></TD></TR>!,
239 'DCRD' => qq!$table<TR><TD ALIGN="right"><font color="#ff0000">*</font> Card type</TD><TD>$cardselect</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Card number</TD><TD><INPUT TYPE="text" NAME="DCRD_payinfo" VALUE="$payinfo" MAXLENGTH=19></TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Expiration</TD><TD>!. expselect("DCRD", $paydate). qq!</TD></TR><TR><TD ALIGN="right"><font color="#ff0000">*</font> Name on card</TD><TD><INPUT TYPE="text" NAME="DCRD_payname" VALUE="$payname"></TD></TR>!,
240 'CHEK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="CHEK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="CHEK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? ' SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="CHEK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="CHEK_month" VALUE="12"><INPUT TYPE="hidden" NAME="CHEK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="CHEK_payname" VALUE="$payname">!,
241 'DCHK' => qq!Electronic check<BR>${r}Account number <INPUT TYPE="text" NAME="DCHK_payinfo1" VALUE="$account" MAXLENGTH=10> Type <SELECT NAME="DCHK_paytype">!. join('', map {qq!<OPTION VALUE="$_"!.($paytype eq $_ ? ' SELECTED' : '').">$_</OPTION>"} @paytypes). qq!</SELECT><BR>${r}ABA/Routing code <INPUT TYPE="text" NAME="DCHK_payinfo2" VALUE="$aba" SIZE=10 MAXLENGTH=9><INPUT TYPE="hidden" NAME="DCHK_month" VALUE="12"><INPUT TYPE="hidden" NAME="DCHK_year" VALUE="2037"><BR>${r}Bank name <INPUT TYPE="text" NAME="DCHK_payname" VALUE="">!,
242 'LECB' => qq!Phone bill billing<BR>${r}Phone number <INPUT TYPE="text" BANE="LECB_payinfo" VALUE="$payinfo" MAXLENGTH=15 SIZE=16><INPUT TYPE="hidden" NAME="LECB_month" VALUE="12"><INPUT TYPE="hidden" NAME="LECB_year" VALUE="2037"><INPUT TYPE="hidden" NAME="LECB_payname" VALUE="">!,
243 'BILL' => qq!Billing<BR>P.O. <INPUT TYPE="text" NAME="BILL_payinfo" VALUE="$payinfo"><BR><INPUT TYPE="hidden" NAME="BILL_month" VALUE="12"><INPUT TYPE="hidden" NAME="BILL_year" VALUE="2037">Attention<INPUT TYPE="text" NAME="BILL_payname" VALUE="$payname">!,
244 'COMP' => qq!Complimentary<BR><font color="#ff0000">*</font>Approved by<INPUT TYPE="text" NAME="COMP_payinfo" VALUE="$payinfo"><BR><font color="#ff0000">*</font>Exp !. expselect("COMP", $paydate),
245 'PREPAY' => qq!Prepaid card<BR><font color="#ff0000">*</font><INPUT TYPE="text" NAME="PREPAY_payinfo" VALUE="$payinfo" MAXLENGTH=80>!,
248 if ( $cvv_enabled ) {
249 foreach my $payby ( grep { exists $payby{$_} } qw(CARD DCRD) ) { #1.4/1.5
250 my $cvv_r = $require_cvv ? '<font color="#ff0000">*</font> ' : '';
251 $paybychecked{$payby} .= qq!<TR><TD ALIGN="right">${cvv_r}CVV2 (<A HREF="javascript:myopen('cvv2.html','cvv2','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=480,height=288')">help</A>)</TD><TD><INPUT TYPE="text" NAME=${payby}_paycvv VALUE="$paycvv" SIZE=4 MAXLENGTH=4></TD></TR>!;
254 if ( $paystate_enabled ) {
255 foreach my $payby ( grep { exists $payby{$_} } qw(CHEK DCHK) ) {
256 my ($county_html, $state_html, $country_html) =
258 prefix => "${payby}_pay",
259 selected_county => $county,
260 selected_state => $state,
261 selected_country => $country,
262 default_state => $statedefault,
263 default_country => $countrydefault,
264 locales => \@cust_main_county,
266 $paybychecked{$payby} .= "<BR>${r}Bank state $county_html $state_html";
270 my %payby_index = ( 'CARD' => qq/Credit Card/,
271 'DCRD' => qq/Credit Card (no auto-charge)/,
273 'DCHK' => qq/Check (no auto-charge)/,
274 'LECB' => qq/Phone Bill Billing/,
275 'BILL' => qq/Billing/,
276 'COMP' => qq/Complimentary/,
277 'PREPAY' => qq/Prepaid Card/,
281 tie my %options, 'Tie::IxHash', ();
283 foreach my $payby_option ( @payby ) {
284 $options{$payby_option} = $payby_index{$payby_option};
287 my $selected_layer = ( grep { $_ eq 'CARD' } @payby ) ? 'CARD' : $payby[0];
289 HTML::Widgets::SelectLayers->new(
290 options => \%options,
291 selected_layer => $selected_layer,
292 form_name => 'dummy',
293 html_between => '</table>',
294 form_action => 'dummy.cgi',
295 layer_callback => sub { my $layer = shift; return ( shift @hide_payment_fields ? '' : $paybychecked{$layer} ) . '</TABLE>'; },
303 <FORM NAME="TaxForm" STYLE="margin:0">
305 <SCRIPT TYPE="text/javascript">
306 function tax_changed(what) {
307 var num = document.getElementById(what.id + '_num');
308 if ( what.checked ) {
309 num.disabled = false;
316 <TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">
318 foreach my $exempt_group ( @exempt_groups ) {
320 my $checked = ${"tax_$exempt_group"} ? 'CHECKED' : '';
321 my $disabled = $checked ? '' : 'DISABLED';
324 <TR><TD><INPUT TYPE="checkbox" NAME="tax_$exempt_group" ID="tax_$exempt_group" VALUE="Y" $checked onChange="tax_changed(this)"> Tax Exempt ($exempt_group taxes)
325 - Exemption number <INPUT TYPE="text" NAME="tax_${exempt_group}_num" ID="tax_${exempt_group}_num" VALUE="${"tax_${exempt_group}_num"}" $disabled></TD>
332 </TABLE><font color="#ff0000">*</font> required fields
336 <FORM name="signup_form" action="<%= $self_url %>" METHOD="POST" onsubmit="return fixup_form();"><BR><FONT SIZE="+1"><B>First package</B></FONT>
337 <INPUT TYPE="hidden" NAME="promo_code" VALUE="<%= $promo_code %>">
338 <INPUT TYPE="hidden" NAME="reg_code" VALUE="<%= $reg_code %>">
339 <TABLE BGCOLOR="<%= $box_bgcolor || '#c0c0c0' %>" BORDER=0 CELLSPACING=0 WIDTH="100%">
341 <TD COLSPAN=2><SELECT NAME="pkgpart">
344 $OUT .= '<OPTION VALUE="">(none)'
345 unless scalar(@part_pkg) == 1 or $default_pkgpart;
346 foreach my $part_pkg ( @part_pkg ) {
347 $OUT .= '<OPTION VALUE="'. $part_pkg->{'pkgpart'}. '"';
348 $OUT .= ' SELECTED' if $pkgpart && $part_pkg->{'pkgpart'} == $pkgpart;
349 $OUT .= '>'. $part_pkg->{'pkg'};
356 if ( $signup_service eq 'svc_phone' ) {
358 $OUT .= '<TR><TD ALIGN="right">Phone number</TD><TD>'.
359 didselector( 'field' => 'phonenum',
360 'svcpart' => $default_svcpart,
366 <TD ALIGN="right">Voicemail PIN</TD>
367 <TD><INPUT TYPE="pin" NAME="pin" VALUE="$pin"></TD>
375 <TD ALIGN="right">Username</TD>
376 <TD><INPUT TYPE="text" NAME="username" VALUE="$username"></TD>
380 $OUT .= domainselector( svcpart=>$default_svcpart, domsvc=>$default_domsvc )
385 <TD ALIGN="right">Password</TD>
386 <TD><INPUT TYPE="password" NAME="_password" VALUE="$_password"></TD>
389 <TD ALIGN="right">Re-enter Password</TD>
390 <TD><INPUT TYPE="password" NAME="_password2" VALUE="$_password2"></TD>
394 if ( $security_phrase ) {
397 <TD ALIGN="right">Security Phrase</TD>
398 <TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="$sec_phrase">
403 $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">';
413 <INPUT TYPE="hidden" NAME="mac_addr" VALUE="$mac_addr">
420 if ( @svc_acct_pop ) {
421 $OUT .= '<TR><TD ALIGN="right">Access number</TD><TD>'.
422 popselector( 'popnum' => $popnum,
423 'pops' => \@svc_acct_pop,
424 'init_popstate' => $init_popstate,
426 'acstate' => $acstate,
430 $OUT .= popselector(popnum=>$popnum, pops=>\@svc_acct_pop);
438 if ( @optional_packages ) {
440 foreach my $ii ( 0 .. $#optional_packages) {
441 my $friendly_index = $ii + 1;
442 if ($optional_packages[$ii]) {
443 push @html, qq|<BR>Optional Package #$friendly_index <br />|,'<table bgcolor="#c0c0c0"><tr><td>';
445 push @html, qq|<select name="optional_package${ii}">|;
446 push @html, qq|<option value="none"></option>|;
447 push @html, map { qq|<option value="$_->{pkgpart}">$_->{pkg}</option>| } @{$optional_packages[$ii]};
448 push @html, q|</select>|;
450 push @html, '</td></tr></table>';
452 $OUT = join("\n", @html);
459 if ( $terms_of_service =~ /\S/ ) {
460 my $title = 'Terms of Service'; #config?
461 my $onclick = qq[overlib( terms_content, CAPTION, "$title", STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE, CLOSECLICK, CLOSETEXT, "Close" );];
462 # Container for $terms_of_service to avoid nasty escaping.
465 <DIV id="div_terms" style="display:none">$terms_of_service</DIV>
466 <SCRIPT type="text/javascript">
467 function agree_to_terms (val) {
468 document.getElementById("signup").disabled = !val;
470 function show_terms () {
471 overlib( document.getElementById('div_terms').innerHTML,
472 CAPTION, '$title', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, DRAGGABLE,
473 CLOSECLICK, CLOSETEXT, 'Close' );
476 <INPUT TYPE="checkbox" onchange="agree_to_terms(this.checked)">
477 I agree to the <a href="javascript:void(0);" onclick="show_terms();">Terms of Service</a>.
481 <BR><INPUT TYPE="submit" ID="signup" NAME="signup" VALUE="Signup">
482 <script language="javascript">
483 <%= length($terms_of_service) ? 'agree_to_terms(false)' : '' %>
485 function fixup_form() {
487 // copy payment method data up to OneTrueForm
489 var payment_method_elements = new Array( 'payinfo', 'payinfo1', 'payinfo2', 'payname', 'paycvv' , 'paystate', 'paytype', 'month', 'year', 'type' );
491 var payment_method_form_name = document.OneTrueForm.select.options[document.OneTrueForm.select.selectedIndex].value;
492 document.OneTrueForm.elements['payby'].value = payment_method_form_name;
493 var payment_method_form = document.forms[payment_method_form_name];
495 for ( ii = 0 ; ii < payment_method_elements.length ; ii++ ) {
496 var true_element_name = payment_method_form_name + '_' + payment_method_elements[ii];
497 copyelement ( payment_method_form.elements[true_element_name],
498 document.OneTrueForm.elements[true_element_name] );
502 // copy tax exempt data up to OneTrueForm
504 var tax_elements = new Array(
505 <%= join(', ', map "'tax_$_', 'tax_${_}_num'", @exempt_groups ) %>
508 for ( ii = 0 ; ii < tax_elements.length ; ii++ ) {
509 copyelement ( document.TaxForm.elements[tax_elements[ii]],
510 document.OneTrueForm.elements[tax_elements[ii]] );
514 // Copy signup details to OneTrueForm
516 var signup_elements = new Array (
517 'promo_code', 'reg_code', 'pkgpart',
518 'username', '_password', '_password2', 'sec_phrase', 'popnum', 'domsvc',
520 'countrycode', 'phonenum', 'sip_password', 'pin'
523 for ( ii = 0 ; ii < signup_elements.length ; ii ++ ) {
524 copyelement ( document.signup_form.elements[signup_elements[ii]],
525 document.OneTrueForm.elements[signup_elements[ii]]);
528 document.OneTrueForm.submit();
532 function copyelement(from, to) {
534 if ( from == undefined ) {
537 if ( from.type == 'select-one' ) {
538 to.value = from.options[from.selectedIndex].value;
539 } else if ( from.type == 'checkbox' ) {
540 if ( from.checked ) {
541 to.value = from.value;
546 if ( from.value == undefined ) {
549 to.value = from.value;
552 //alert(from.name + " (" + from.type + "): " + to.name + " => " + to.value);
558 <%= $OUT .= $body_footer %>