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