summaryrefslogtreecommitdiff
path: root/httemplate/misc
diff options
context:
space:
mode:
authorlevinse <levinse>2011-06-22 23:41:27 +0000
committerlevinse <levinse>2011-06-22 23:41:27 +0000
commit39eaf5704bd78a458e6734f8ea2f1e07a60d4196 (patch)
treebbae2a9ed04a21b9feec236491302ce07cd7993b /httemplate/misc
parent2174469c067129252ed59918002a629bf770fdab (diff)
add router and addr_block delete features, RT13197
Diffstat (limited to 'httemplate/misc')
-rw-r--r--httemplate/misc/delete-addr_block.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/httemplate/misc/delete-addr_block.html b/httemplate/misc/delete-addr_block.html
new file mode 100644
index 000000000..83a4b6823
--- /dev/null
+++ b/httemplate/misc/delete-addr_block.html
@@ -0,0 +1,19 @@
+% if ( $error ) {
+% errorpage($error);
+% } else {
+<% $cgi->redirect("${p}browse/addr_block.cgi") %>
+% }
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Broadband configuration')
+ || $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
+
+my($query) = $cgi->keywords;
+$query =~ /^(\d+)$/ || die "Illegal blocknum";
+my $blocknum = $1;
+
+my $addr_block = qsearchs('addr_block',{'blocknum'=>$blocknum});
+my $error = $addr_block->delete;
+
+</%init>