summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Kiernan <fkiernan@id.net.ar>2014-01-18 17:16:43 -0300
committerFernando Kiernan <fkiernan@id.net.ar>2016-03-21 22:07:14 -0300
commitfca32110d9fe0b257353e627d1f66706d719d59f (patch)
tree5c28cc311338c748d0c366db302c242174eff36a
parentbab5583acee02f55e13a026b280f7528aa0c8d01 (diff)
- Limit languages on preferences to only those available-locales.
-rw-r--r--httemplate/pref/pref.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 50d6e8d..48ec129 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -36,7 +36,7 @@ Interface
<TH ALIGN="right">Locale: </TH>
<TD COLSPAN=2>
<SELECT NAME="locale">
-% foreach my $locale ( FS::Locales->locales ) {
+% foreach my $locale ( @locales ) {
% my %info = FS::Locales->locale_info($locale);
% my $selected = ($locale eq $curuser->option('locale'))
% ? 'SELECTED' : '';
@@ -282,4 +282,14 @@ my $menu_position = $1;
=~ /^([,\w\@.\-]*)$/ or die "illegal email_address"; #too late
my $email_address = $1;
+my $conf = new FS::Conf;
+
+my @locales = $conf->config('available-locales');
+
+if ( ! @locales ) {
+
+ @locales = FS::Locales->locales ;
+
+}
+
</%init>