[freeside-commits] freeside/httemplate/edit/process/addr_block add.cgi, 1.2, 1.3 allocate.cgi, 1.2, 1.3 deallocate.cgi, 1.2, 1.3 split.cgi, 1.2, 1.3
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Apr 17 20:30:02 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block
In directory wavetail.420.am:/tmp/cvs-serv31906/httemplate/edit/process/addr_block
Modified Files:
add.cgi allocate.cgi deallocate.cgi split.cgi
Log Message:
drag address and router even farther into the century
Index: allocate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/allocate.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- allocate.cgi 23 Aug 2006 22:25:37 -0000 1.2
+++ allocate.cgi 18 Apr 2008 03:29:59 -0000 1.3
@@ -1,26 +1,14 @@
-%
-%my $error = '';
-%my $blocknum = $cgi->param('blocknum');
-%my $routernum = $cgi->param('routernum');
-%
-%my $addr_block = qsearchs('addr_block', { blocknum => $blocknum });
-%my $router = qsearchs('router', { routernum => $routernum });
-%
-%if($addr_block) {
-% if ($router) {
-% $error = $addr_block->allocate($router);
-% } else {
-% $error = "Cannot find router with routernum $routernum";
-% }
-%} else {
-% $error = "Cannot find block with blocknum $blocknum";
-%}
-%
-%if ( $error ) {
-% $cgi->param('error', $error);
-% print $cgi->redirect(popurl(4). "browse/addr_block.cgi?" . $cgi->query_string);
-%} else {
-% print $cgi->redirect(popurl(4). "browse/addr_block.cgi");
-%}
-%
+<% include( '../elements/process.html',
+ 'table' => 'addr_block',
+ 'copy_on_empty' => [ fields 'addr_block' ],
+ 'error_redirect' => popurl(3). 'allocate.html?',
+ 'popup_reload' => 'Block allocated',
+ )
+%>
+<%init>
+my $conf = new FS::Conf;
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>
Index: deallocate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/deallocate.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- deallocate.cgi 23 Aug 2006 22:25:37 -0000 1.2
+++ deallocate.cgi 18 Apr 2008 03:29:59 -0000 1.3
@@ -23,3 +23,10 @@
%}
%
+<%init>
+
+my $conf = new FS::Conf;
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>
Index: split.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/split.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- split.cgi 23 Aug 2006 22:25:37 -0000 1.2
+++ split.cgi 18 Apr 2008 03:29:59 -0000 1.3
@@ -18,3 +18,10 @@
%}
%
+<%init>
+
+my $conf = new FS::Conf;
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>
Index: add.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/add.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- add.cgi 23 Aug 2006 22:25:37 -0000 1.2
+++ add.cgi 18 Apr 2008 03:29:59 -0000 1.3
@@ -19,3 +19,10 @@
%}
%
+<%init>
+
+my $conf = new FS::Conf;
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>
More information about the freeside-commits
mailing list