From 37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539 Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 23 Apr 2010 06:47:38 +0000 Subject: communigate (phase 2): rules. RT#7514 --- httemplate/misc/delete-cgp_rule.html | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 httemplate/misc/delete-cgp_rule.html (limited to 'httemplate/misc/delete-cgp_rule.html') diff --git a/httemplate/misc/delete-cgp_rule.html b/httemplate/misc/delete-cgp_rule.html new file mode 100644 index 000000000..a2ba2dbc9 --- /dev/null +++ b/httemplate/misc/delete-cgp_rule.html @@ -0,0 +1,23 @@ +% if ( $error ) { +% errorpage($error); +% } else { +<% $cgi->redirect($p. "browse/cgp_rule.html?svcnum=". $svcnum) %> +% } +<%init> + +# :/ needs agent-virt so you can't futz with arbitrary rules + +#die "access denied" +# unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); + +#untaint devicenum +my($query) = $cgi->keywords; +$query =~ /^(\d+)$/ || die "Illegal rulenum"; +my $rulenum = $1; + +my $cgp_rule = qsearchs('cgp_rule', { 'rulenum' => $rulenum } ); +my $svcnum = $cgp_rule->svcnum; + +my $error = $cgp_rule->delete; + + -- cgit v1.2.1