RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / edit / process / invoice_conf.html
1 <& elements/process.html,
2   'table'       => 'invoice_conf',
3   'viewall_dir' => 'browse',
4   'fields'      => [ FS::invoice_conf->fields, 'modename', 'agentnum' ],
5   'precheck_callback' => \&precheck_callback,
6 &>
7 <%init>
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right(['Edit templates','Edit global templates']);
10
11 sub precheck_callback {
12   my $cgi = shift;
13   $cgi->param('locale') =~ /^(\w*)$/;
14   my $locale = $1;
15   return mt('Language required') if $locale eq 'new'; # the user didn't choose
16   die "unknown locale $locale" if ( $locale and 
17                                     !FS::Locales->locale_info($locale) );
18 }
19 # invoice_conf itself knows to create/update invoice_mode if necessary,
20 # so nothing special here
21 </%init>