diff options
| author | mark <mark> | 2011-09-16 00:15:48 +0000 |
|---|---|---|
| committer | mark <mark> | 2011-09-16 00:15:48 +0000 |
| commit | 9c866ccad0f187f29d21f12b93f15f2787aa9843 (patch) | |
| tree | f1a17825d748de59b6d578f5510ab2bb9e6a43bb /httemplate/config/config.cgi | |
| parent | 2e9b97a7492a06855cc55a65f4df7b14607a0db9 (diff) | |
invoice template and config localization, #12367
Diffstat (limited to 'httemplate/config/config.cgi')
| -rw-r--r-- | httemplate/config/config.cgi | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/httemplate/config/config.cgi b/httemplate/config/config.cgi index 040ed0403..6a1eaecf7 100644 --- a/httemplate/config/config.cgi +++ b/httemplate/config/config.cgi @@ -24,6 +24,7 @@ function SafeOnsubmit() { <FORM NAME="OneTrueForm" ACTION="config-process.cgi" METHOD="POST" enctype="multipart/form-data" onSubmit="SafeOnsubmit()"> <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $agentnum %>"> +<INPUT TYPE="hidden" NAME="locale" VALUE="<% $locale %>"> <INPUT TYPE="hidden" NAME="key" VALUE="<% $key %>"> Setting <b><% $key %></b> @@ -49,7 +50,8 @@ Setting <b><% $key %></b> <% $conf->exists($key, $agentnum) ? 'Current image<br>'. '<img src="config-image.cgi?key='. $key. - ';agentnum='. $agentnum. '"><br>' + ';agentnum='. $agentnum. + ';locale='. $locale .'"><br>' : '' %> @@ -318,10 +320,6 @@ Setting <b><% $key %></b> </HTML> <%once> -my $conf = new FS::Conf; -my @config_items = $conf->config_items; -my %confitems = map { $_->key => $_ } @config_items; - my %element_types = map { $_ => 1 } qw( select-part_svc select-part_pkg select-pkg_class select-agent ); @@ -339,6 +337,15 @@ if ($cgi->param('agentnum') =~ /(\d+)$/) { $agentnum=$1; } +my $locale = ''; +if ( $cgi->param('locale') =~ /^(\w+_\w+)$/) { + $locale = $1; +} + +my $conf = new FS::Conf { 'locale' => $locale, 'localeonly' => 1 }; +my @config_items = $conf->config_items; +my %confitems = map { $_->key => $_ } @config_items; + my $agent = ''; my $title; if ($agentnum) { |
