X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Frouter.cgi;h=72111ca57a4b96510e20fbf9784044e1270f688a;hb=103dfde149eec5034696d073253255f508a1be78;hp=70eaa4576e8c2367fde6932f14293047bfb95138;hpb=fb4ab1073f0d15d660c6cdc4e07afebf68ef3924;p=freeside.git
diff --git a/httemplate/edit/router.cgi b/httemplate/edit/router.cgi
index 70eaa4576..72111ca57 100755
--- a/httemplate/edit/router.cgi
+++ b/httemplate/edit/router.cgi
@@ -6,11 +6,20 @@
'labels' => { 'routernum' => 'Router',
'routername' => 'Name',
'svc_part' => 'Service',
+ 'agentnum' => 'Agent',
+ 'manual_addr' => '
+ Assign IP addresses manually
+
+ Uncheck to assign IP address
+ from router/address block
+
+ ',
},
'fields' => [
{ 'field'=>'routername', 'type'=>'text', 'size'=>32 },
{ 'field'=>'agentnum', 'type'=>'select-agent' },
{ 'field'=>'svcnum', 'type'=>'hidden' },
+ { 'field'=>'manual_addr','type'=>'checkbox','value'=>'Y'},
],
'error_callback' => $callback,
'edit_callback' => $callback,
@@ -26,19 +35,26 @@ die "access denied"
unless $curuser->access_right('Broadband configuration')
|| $curuser->access_right('Broadband global configuration');
+my @svc_x = 'svc_broadband';
+if ( FS::Conf->new->exists('svc_acct-ip_addr') ) {
+ push @svc_x, 'svc_acct';
+}
+
my $callback = sub {
my ($cgi, $object, $fields) = (shift, shift, shift);
+
+ my $extra_sql = ' AND svcdb IN(' . join(',', map { "'$_'" } @svc_x) . ')';
unless ($object->svcnum) {
push @{$fields},
{ 'type' => 'tablebreak-tr-title',
'value' => 'Select the service types available on this router',
},
- { 'field' => 'svc_part',
- 'type' => 'checkboxes-table',
+ { 'type' => 'checkboxes-table',
'target_table' => 'part_svc',
'link_table' => 'part_svc_router',
'name_col' => 'svc',
- 'hashref' => { 'svcdb' => 'svc_broadband', 'disabled' => '' },
+ 'hashref' => { 'disabled' => '' },
+ 'extra_sql' => $extra_sql,
};
}
};