!;
$text;
+
}
sub expselect {
@@ -347,194 +519,146 @@ sub expselect {
$return;
}
-sub success_default { #html to use if you don't specify a success file
- <<'END';
-Signup successful
-Signup successful
-Thanks for signing up!
-
+#false laziness w/FS::cust_main_county
+sub regionselector {
+ my ( $selected_county, $selected_state, $selected_country,
+ $prefix, $onchange ) = @_;
+
+ $prefix = '' unless defined $prefix;
+
+ my $countyflag = 0;
+
+ my %cust_main_county;
+
+# unless ( @cust_main_county ) { #cache
+ #@cust_main_county = qsearch('cust_main_county', {} );
+ #foreach my $c ( @cust_main_county ) {
+ foreach my $c ( @$locales ) {
+ #$countyflag=1 if $c->county;
+ $countyflag=1 if $c->{county};
+ #push @{$cust_main_county{$c->country}{$c->state}}, $c->county;
+ #$cust_main_county{$c->country}{$c->state}{$c->county} = 1;
+ $cust_main_county{$c->{country}}{$c->{state}}{$c->{county}} = 1;
+ }
+# }
+ $countyflag=1 if $selected_county;
+
+ my $script_html = <
+ function opt(what,value,text) {
+ var optionName = new Option(text, value, false, false);
+ var length = what.length;
+ what.options[length] = optionName;
+ }
+ function ${prefix}country_changed(what) {
+ country = what.options[what.selectedIndex].text;
+ for ( var i = what.form.${prefix}state.length; i >= 0; i-- )
+ what.form.${prefix}state.options[i] = null;
END
-}
+ #what.form.${prefix}state.options[0] = new Option('', '', false, true);
-sub signup_default { #html to use if you don't specify a template file
- <<'END';
-ISP Signup form
-ISP Signup form
-<%= $error %>
-
+
+ my $state_html = qq!';
+
+ $state_html .= '';
+
+ my $country_html = qq!';
+
+ ($county_html, $state_html, $country_html);
+
+}
+
+sub success_default { #html to use if you don't specify a success file
+ <<'END';
+Signup successful
+Signup successful
+Thanks for signing up!
+
+Signup information for <%= $email_name %>:
+
+Username: <%= $username %>
+Password: <%= $password %>
+Access number: (<%= $ac %>) / $exch - $local
+Package: <%= $pkg %>
+
END
}
+
+sub decline_default { #html to use if there is a decline
+ <<'END';
+Processing error
+Processing error
+There has been an error processing your account. Please contact customer
+support.
+
+END
+}
+