[freeside-commits] freeside/fs_selfservice/FS-SelfService SelfService.pm, 1.39, 1.40
Ivan,,,
ivan at wavetail.420.am
Sat Nov 29 13:54:37 PST 2008
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService
In directory wavetail.420.am:/tmp/cvs-serv1306/fs_selfservice/FS-SelfService
Modified Files:
SelfService.pm
Log Message:
add selfservice_server-single_domain config, and login_info self-service method to give the login page a bit more configurability
Index: SelfService.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/SelfService.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- SelfService.pm 24 Oct 2008 19:54:11 -0000 1.39
+++ SelfService.pm 29 Nov 2008 21:54:35 -0000 1.40
@@ -25,6 +25,7 @@
'passwd' => 'passwd/passwd',
'chfn' => 'passwd/passwd',
'chsh' => 'passwd/passwd',
+ 'login_info' => 'MyAccount/login_info',
'login' => 'MyAccount/login',
'logout' => 'MyAccount/logout',
'customer_info' => 'MyAccount/customer_info',
@@ -63,7 +64,11 @@
'call_time_nanpa' => 'PrepaidPhone/call_time_nanpa',
'phonenum_balance' => 'PrepaidPhone/phonenum_balance',
);
- at EXPORT_OK = ( keys(%autoload), qw( regionselector expselect popselector domainselector didselector) );
+ at EXPORT_OK = (
+ keys(%autoload),
+ qw( regionselector regionselector_hashref
+ expselect popselector domainselector didselector )
+);
$ENV{'PATH'} ='/usr/bin:/usr/ucb:/bin';
$ENV{'SHELL'} = '/bin/sh';
@@ -1189,24 +1194,45 @@
}
$state_html .= '</SELECT>';
- $state_html .= '</SELECT>';
+ my $country_html = '';
+ if ( scalar( keys %cust_main_county ) > 1 ) {
+
+ $country_html = qq(<SELECT NAME="${prefix}country" ).
+ qq(onChange="${prefix}country_changed(this); ).
+ $param->{'onchange'}.
+ '"'.
+ '>';
+ my $countrydefault = $param->{default_country} || 'US';
+ foreach my $country (
+ sort { ($b eq $countrydefault) <=> ($a eq $countrydefault) or $a cmp $b }
+ keys %cust_main_county
+ ) {
+ my $selected = $country eq $param->{'selected_country'}
+ ? ' SELECTED'
+ : '';
+ $country_html .= "\n<OPTION$selected>$country</OPTION>"
+ }
+ $country_html .= '</SELECT>';
+ } else {
+
+ $country_html = qq(<INPUT TYPE="hidden" NAME="${prefix}country" ).
+ ' VALUE="'. (keys %cust_main_county )[0]. '">';
- my $country_html = qq!<SELECT NAME="${prefix}country" !.
- qq!onChange="${prefix}country_changed(this); $param->{'onchange'}">!;
- my $countrydefault = $param->{default_country} || 'US';
- foreach my $country (
- sort { ($b eq $countrydefault) <=> ($a eq $countrydefault) or $a cmp $b }
- keys %cust_main_county
- ) {
- my $selected = $country eq $param->{'selected_country'} ? ' SELECTED' : '';
- $country_html .= "\n<OPTION$selected>$country</OPTION>"
}
- $country_html .= '</SELECT>';
($county_html, $state_html, $country_html);
}
+sub regionselector_hashref {
+ my ($county_html, $state_html, $country_html) = regionselector(@_);
+ {
+ 'county_html' => $county_html,
+ 'state_html' => $state_html,
+ 'country_html' => $country_html,
+ };
+}
+
#=item expselect HASHREF | LIST
#
#Takes as input a hashref or list of key/value pairs with the following keys:
More information about the freeside-commits
mailing list