[freeside-commits] freeside/httemplate/edit/process/addr_block allocate.cgi, 1.2.2.2, 1.2.2.3
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri May 9 14:52:00 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block
In directory wavetail.420.am:/tmp/cvs-serv27960/httemplate/edit/process/addr_block
Modified Files:
Tag: FREESIDE_1_7_BRANCH
allocate.cgi
Log Message:
re-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.2.2
retrieving revision 1.2.2.3
diff -u -d -r1.2.2.2 -r1.2.2.3
--- allocate.cgi 18 Apr 2008 16:27:44 -0000 1.2.2.2
+++ allocate.cgi 9 May 2008 21:51:58 -0000 1.2.2.3
@@ -1,29 +1,17 @@
-%
-%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>
<%init>
my $conf = new FS::Conf;
More information about the freeside-commits
mailing list