summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-05-03 14:35:11 -0700
committerIvan Kohler <ivan@freeside.biz>2012-05-03 14:35:11 -0700
commit5e8073ffe5707504751b8df36f645b325a895f87 (patch)
tree887209f29c217dd597744a1e74c749631eebc31a /httemplate
parent79ca46c249e58be3b7c70df57a8fc75a60ceb622 (diff)
add cust_main-require_locale configuration setting, RT#17594
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/cust_main/billing.html33
1 files changed, 19 insertions, 14 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index 9f4cb74..0194d31 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -570,20 +570,25 @@ function toggle(obj) {
%my @available_locales = $conf->config('available-locales');
%if ( scalar(@available_locales) ) {
-% push @available_locales, '';
-% my %locale_labels = map {
-% my %ll;
-% my %info = FS::Locales->locale_info($_);
-% $ll{$_} = $info{name} . " (" . $info{country} . ")";
-% %ll;
-% } FS::Locales->locales;
- <& /elements/tr-select.html,
- 'label' => emt('Invoicing locale'),
- 'field' => 'locale',
- 'options' => \@available_locales,
- 'labels' => \%locale_labels,
- 'curr_value' => $cust_main->locale,
- &>
+% push @available_locales, ''
+% unless $cust_main->locale && $conf->exists('cust_main-require_locale');
+% my %locale_labels = map {
+% my %ll;
+% my %info = FS::Locales->locale_info($_);
+% $ll{$_} = $info{name} . " (" . $info{country} . ")";
+% %ll;
+% } FS::Locales->locales;
+%
+% my $label = ( $conf->exists('cust_main-require_locale') ? $r : '' ).
+% emt('Invoicing locale');
+
+ <& /elements/tr-select.html,
+ 'label' => $label,
+ 'field' => 'locale',
+ 'options' => \@available_locales,
+ 'labels' => \%locale_labels,
+ 'curr_value' => $cust_main->locale,
+ &>
% }
</TABLE>