diff options
author | ivan <ivan> | 2010-04-23 06:47:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-04-23 06:47:38 +0000 |
commit | 37591b61f8ad6fc5c5acb2fd8f520d2dbe4f1539 (patch) | |
tree | 5a89dc6c073118b973c06f44070b4fbf65dd65e7 /httemplate/misc/delete-cgp_rule.html | |
parent | 3a201934245c2e72b167804a6d512e0e6d435f65 (diff) |
communigate (phase 2): rules. RT#7514
Diffstat (limited to 'httemplate/misc/delete-cgp_rule.html')
-rw-r--r-- | httemplate/misc/delete-cgp_rule.html | 23 |
1 files changed, 23 insertions, 0 deletions
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; + +</%init> |