[freeside-commits] freeside/httemplate/edit/process/addr_block allocate.cgi, 1.2.2.1, 1.2.2.2
Jeff Finucane,420,,
jeff at wavetail.420.am
Fri Apr 18 09:27:46 PDT 2008
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.4.2.4, 1.4.2.5 router.cgi, 1.8.2.4, 1.8.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block
In directory wavetail.420.am:/tmp/cvs-serv19149/httemplate/edit/process/addr_block
Modified Files:
Tag: FREESIDE_1_7_BRANCH
allocate.cgi
Log Message:
backout browse changes until 1.7.4
Index: allocate.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/addr_block/allocate.cgi,v
retrieving revision 1.2.2.1
retrieving revision 1.2.2.2
diff -u -d -r1.2.2.1 -r1.2.2.2
--- allocate.cgi 18 Apr 2008 03:29:28 -0000 1.2.2.1
+++ allocate.cgi 18 Apr 2008 16:27:44 -0000 1.2.2.2
@@ -1,10 +1,29 @@
-<% include( '../elements/process.html',
- 'table' => 'addr_block',
- 'copy_on_empty' => [ fields 'addr_block' ],
- 'error_redirect' => popurl(3). 'allocate.html?',
- 'popup_reload' => 'Block allocated',
- )
-%>
+%
+%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");
+%}
+%
+
<%init>
my $conf = new FS::Conf;
- Previous message: [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
- Next message: [freeside-commits] freeside/httemplate/browse addr_block.cgi, 1.4.2.4, 1.4.2.5 router.cgi, 1.8.2.4, 1.8.2.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list