[freeside-commits] freeside/httemplate/edit tower.html,1.1,1.2
Mark Wells
mark at wavetail.420.am
Thu Feb 9 17:58:10 PST 2012
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv20998/httemplate/edit
Modified Files:
tower.html
Log Message:
allow towers without sectors, #16398 continued
Index: tower.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/tower.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- tower.html 10 Dec 2011 00:36:47 -0000 1.1
+++ tower.html 10 Feb 2012 01:58:08 -0000 1.2
@@ -4,6 +4,8 @@
viewall_dir => 'browse',
fields => [ 'towername',
{ field=>'disabled', type=>'checkbox', value=>'Y', },
+ { field => 'default_ip_addr',
+ curr_value_callback => $default_ip_addr_callback },
{ field => 'sectornum',
type => 'tower_sector',
o2m_table => 'tower_sector',
@@ -15,6 +17,7 @@
'towername' => 'Name',
'sectornum' => 'Sector',
'disabled' => 'Disabled',
+ 'default_ip_addr' => 'Tower IP address',
},
&>
<%init>
@@ -34,4 +37,10 @@
} grep /^sectornum\d+$/, ($cgi->param);
};
+my $default_ip_addr_callback = sub {
+ my ($cgi, $object) = @_;
+ my $sector = $object ? $object->default_sector : '';
+ $sector ? $sector->ip_addr : '';
+};
+
</%init>
More information about the freeside-commits
mailing list