residential prospects, RT#7111
[freeside.git] / httemplate / edit / torrus_srvderive.html
1 <% include( 'elements/edit.html',
2               'name_singular' => 'virtual port',
3               'table'         => 'torrus_srvderive',
4               'labels'        => { 'derivenum' => 'Virtual Port',
5                                    'serviceid' => 'Torrus serviceid',
6                                  },
7               'fields'        => [ 'serviceid',
8                                  ],
9               'viewall_dir'   => 'browse',
10               'html_bottom'   => $html_bottom_sub,
11           )
12 %>
13 <%init>
14
15 die "access denied"
16   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
17
18 my $html_bottom_sub = sub {
19   my $torrus_srvderive = shift;
20
21   my $nms = new FS::NetworkMonitoringSystem;
22   my @serviceids = $nms->torrus_serviceids;
23
24   ntable('#cccccc',2).'<TR><TD>'.
25     include( '/elements/checkboxes-table-name.html',
26                'source_obj'    => $torrus_srvderive,
27                'link_table'    => 'torrus_srvderive_component',
28                'num_col'       => 'derivenum',
29                'name_col'      => 'serviceid',
30                'names_list'    => \@serviceids,
31                'disable_links' => 1,
32            ).
33   '</TD></TR></TABLE>';
34
35 };
36
37
38 </%init>