import torrus 1.0.9
[freeside.git] / fs_selfservice / FS-SelfService / cgi / signup.html
index ae7b222..7a56a31 100755 (executable)
@@ -30,6 +30,7 @@
 <FORM NAME="OneTrueForm" ACTION="<%= $self_url %>" METHOD=POST onSubmit="document.OneTrueForm.signup.disabled=true">
 <INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>">
 <INPUT TYPE="hidden" NAME="action" VALUE="process_signup">
+<INPUT TYPE="hidden" NAME="agentnum" VALUE="<%= $agentnum %>">
 <INPUT TYPE="hidden" NAME="referral_custnum" VALUE="<%= $referral_custnum %>">
 <INPUT TYPE="hidden" NAME="ss" VALUE="">
 <input type="hidden" name="payby">
@@ -38,7 +39,7 @@
 %>
 
 <%=
-  $OUT = join("\n", map { qq|<input type="hidden" name="$_" />| } qw / promo_code reg_code pkgpart username _password _password2 sec_phrase popnum countrycode phonenum sip_password pin / );
+  $OUT = join("\n", map { qq|<input type="hidden" name="$_" />| } qw / promo_code reg_code pkgpart username _password _password2 sec_phrase popnum mac_addr countrycode phonenum sip_password pin / );
 %>
 
 Where did you hear about our service? <SELECT NAME="refnum">
@@ -46,7 +47,7 @@ Where did you hear about our service? <SELECT NAME="refnum">
   $OUT .= '<OPTION VALUE="">' unless $refnum;
   foreach my $part_referral ( @part_referral ) {
     $OUT .= '<OPTION VALUE="'. $part_referral->{'refnum'}. '"';
-    $OUT .= ' SELECTED' if $part_referral->{'refnum'} eq $refnum;
+    $OUT .= ' SELECTED' if $part_referral->{'refnum'} == $refnum;
     $OUT .= '>'. $part_referral->{'referral'};
   }
 %>
@@ -73,8 +74,6 @@ Contact Information
 <TR>
   <TH ALIGN="right"><font color="#ff0000">*</font>City</TH>
   <TD><INPUT TYPE="text" NAME="city" VALUE="<%= $city %>"></TD>
-  <TH ALIGN="right"><font color="#ff0000">*</font>State/Country</TH>
-  <TD>
     <%=
         ($county_html, $state_html, $country_html) =
           regionselector( {
@@ -86,8 +85,11 @@ Contact Information
             locales          => \@cust_main_county,
           } );
  
-        "$county_html $state_html";
     %>
+  <TH ALIGN="right"><font color="#ff0000">*</font>
+    <%= ($county_html =~ /SELECT/) ? 'County/State' : 'State' %></TH>
+  <TD>
+    <%= "$county_html $state_html"; %>
   </TD>
   <TH><font color="#ff0000">*</font>Zip</TH>
   <TD><INPUT TYPE="text" NAME="zip" SIZE=10 VALUE="<%= $zip %>"></TD>
@@ -217,9 +219,6 @@ Contact Information
       }
     }
 
-use Tie::IxHash;
-use HTML::Widgets::SelectLayers;
-
   my %payby_index = ( 'CARD'   => qq/Credit Card/,
                       'DCRD'   => qq/Credit Card/,
                       'CHEK'   => qq/Check/,
@@ -316,6 +315,18 @@ SECPHRASE
       $OUT .= '<INPUT TYPE="hidden" NAME="sec_phrase" VALUE="">';
     }
 
+    if ( $nomadix ) {
+
+      warn $mac_addr;
+      $mac_addr ||= $MA;
+      warn $mac_addr;
+
+      $OUT .= <<NOMADIX;
+        <INPUT TYPE="hidden" NAME="mac_addr" VALUE="$mac_addr">
+NOMADIX
+
+    }
+
   }
 
   if ( @svc_acct_pop ) {
@@ -380,6 +391,7 @@ function fixup_form() {
     var signup_elements = new Array (
       'promo_code', 'reg_code', 'pkgpart',
       'username', '_password', '_password2', 'sec_phrase', 'popnum',
+      'mac_addr',
       'countrycode', 'phonenum', 'sip_password', 'pin'
     );