X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Finvoice_conf.html;fp=httemplate%2Fedit%2Fprocess%2Finvoice_conf.html;h=1d45e126f7762abd6dc064e8f6260fa7ce069dd2;hb=eb3bd392a89b8b666dc512951e78913c05b98810;hp=0000000000000000000000000000000000000000;hpb=e3012c0751dad6710ea35b6d074b551bffdad09b;p=freeside.git diff --git a/httemplate/edit/process/invoice_conf.html b/httemplate/edit/process/invoice_conf.html new file mode 100644 index 000000000..1d45e126f --- /dev/null +++ b/httemplate/edit/process/invoice_conf.html @@ -0,0 +1,21 @@ +<& elements/process.html, + 'table' => 'invoice_conf', + 'viewall_dir' => 'browse', + 'fields' => [ FS::invoice_conf->fields, 'modename', 'agentnum' ], + 'precheck_callback' => \&precheck_callback, +&> +<%init> +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right(['Edit templates','Edit global templates']); + +sub precheck_callback { + my $cgi = shift; + $cgi->param('locale') =~ /^(\w*)$/; + my $locale = $1; + return mt('Language required') if $locale eq 'new'; # the user didn't choose + die "unknown locale $locale" if ( $locale and + !FS::Locales->locale_info($locale) ); +} +# invoice_conf itself knows to create/update invoice_mode if necessary, +# so nothing special here +