summaryrefslogtreecommitdiff
path: root/httemplate/pref
diff options
context:
space:
mode:
authorivan <ivan>2011-05-11 16:20:13 +0000
committerivan <ivan>2011-05-11 16:20:13 +0000
commit83053569b3d965924e2e1d4f5b199609ec7c29af (patch)
treecf7b145fe37e171045040cf9619e6aab98689cae /httemplate/pref
parent38eb380a88ea7a130e83b77ff9c51ef6967b707b (diff)
i18n, RT#12515
Diffstat (limited to 'httemplate/pref')
-rw-r--r--httemplate/pref/pref-process.html4
-rw-r--r--httemplate/pref/pref.html14
2 files changed, 16 insertions, 2 deletions
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index 897be252c..0ee48fd9e 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -21,7 +21,7 @@ if ( grep { $cgi->param($_) !~ /^\s*$/ }
$access_user = qsearchs( 'access_user', {
'username' => getotaker,
- '_password' => $cgi->param('_password'),
+ '_password' => scalar($cgi->param('_password')),
} );
$error = 'Current password incorrect; password not changed'
@@ -48,7 +48,7 @@ unless ( $error ) { # if ($access_user) {
my %param = $access_user->options;
#XXX autogen
- my @paramlist = qw( menu_position default_customer_view
+ my @paramlist = qw( locale menu_position default_customer_view
disable_html_editor
email_address
snom-ip snom-username snom-password
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index c7083e9d0..da8b42867 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -31,6 +31,20 @@ Interface
<% ntable("#cccccc",2) %>
<TR>
+ <TH ALIGN="right">Locale: </TH>
+ <TD>
+ <SELECT NAME="locale">
+% foreach my $locale ( FS::Locales->locales ) {
+% my %info = FS::Locales->locale_info($locale);
+% my $selected = ($locale eq $curuser->option('locale'))
+% ? 'SELECTED' : '';
+ <OPTION VALUE="<% $locale %>" <%$selected%>><% $info{name} %> (<% $info{country} %>)
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
+ <TR>
<TH ALIGN="right">Menu location: </TH>
<TD>
<INPUT TYPE="radio" NAME="menu_position" VALUE="left" onClick="document.images['menu_example'].src='../images/menu-left-example.png';" <% $menu_position eq 'left' ? ' CHECKED' : ''%>> Left<BR>