summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2013-10-08 23:00:26 -0700
committerIvan Kohler <ivan@freeside.biz>2013-10-08 23:00:26 -0700
commitfe4515eb37d76849dd08c62782d86bc7ba311dcd (patch)
tree6952cc3598de0c72b6a3eab1d53bde07a16c27f2 /httemplate/edit/process
parentf2766e203e1aa144d046a26cf13e01e1f5b00f64 (diff)
parent81ae0992cf8506c6a77485548ebde25eb946a9a9 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Conflicts: FS/FS/cust_main.pm
Diffstat (limited to 'httemplate/edit/process')
-rw-r--r--httemplate/edit/process/cable_provider.html10
-rw-r--r--httemplate/edit/process/invoice_conf.html21
2 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/edit/process/cable_provider.html b/httemplate/edit/process/cable_provider.html
new file mode 100644
index 000000000..ecffaf692
--- /dev/null
+++ b/httemplate/edit/process/cable_provider.html
@@ -0,0 +1,10 @@
+<& elements/process.html,
+ 'table' => 'cable_provider',
+ 'viewall_dir' => 'browse',
+&>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>
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
+</%init>