address standardization UI, part 1
[freeside.git] / httemplate / misc / delete-addr_range.html
1 % if ( $error ) {
2 <& /elements/errorpage-popup.html, $error &>
3 % } else {
4 <& /elements/header-popup.html, "Address range deleted" &>
5   <SCRIPT TYPE="text/javascript">
6     window.top.location.reload();
7   </SCRIPT>
8 </BODY>
9 </HTML>
10 % }
11 <%init>
12
13 die "access denied"
14   unless $FS::CurrentUser::CurrentUser->access_right('Broadband global configuration');
15
16 my ($rangenum) = $cgi->keywords;
17 $rangenum =~ /^\d+$/ or die "bad rangenum '$rangenum'";
18 my $addr_range = FS::addr_range->by_key($rangenum);
19 die "unknown rangenum $rangenum" unless $addr_range;
20 my $error = $addr_range->delete;
21 </%init>