1 <% include( 'elements/edit.html',
2 'name' => 'Internal Access Group',
3 'table' => 'access_group',
5 'groupnum' => 'Group number',
6 'groupname' => 'Group name',
9 'viewall_dir' => 'browse',
11 'html_bottom' => $html_bottom_sub,
16 tie my %rights, 'Tie::IxHash', FS::AccessRight->rights_info;
21 my $html_bottom_sub = sub {
22 my $access_group = shift;
24 #some false laziness w/browse/access_group.html
29 '<FONT SIZE="+1">Group limited to these agent(s)</FONT><BR>'.
30 'Employees in this group will only see customers of the selected agents in the system and reports.<BR>'.
33 include( '/elements/checkboxes-table.html',
34 'source_obj' => $access_group,
35 'link_table' => 'access_groupagent',
36 'target_table' => 'agent',
37 'name_col' => 'agent',
38 'target_link' => $p.'edit/agent.cgi?',
43 '<BR><FONT SIZE="+1">Group access rights</FONT><BR>'.
44 include('/elements/table-grid.html', bgcolor=>'#cccccc' ).
45 '<TR>'. join( '', map {
46 '<TD CLASS="inv" VALIGN="top"><TABLE BGCOLOR="#cccccc" WIDTH=100%>'.
47 '<TR><TH BGCOLOR="#dcdcdc">'. $_. '</TH></TR>'.
49 include( '/elements/checkboxes-table-name.html',
50 'source_obj' => $access_group,
51 'link_table' => 'access_right',
52 'link_static' => { 'righttype' =>
55 'num_col' => 'rightobjnum',
56 'name_col' => 'rightname',
57 'names_list' => [ map {
59 ref($_) ? $_->{'rightname'} : $_;
61 $hash{'note'} = ' *'
62 if ref($_) && $_->{'global'};
63 $hash{'desc'} = $_->{'desc'}
64 if ref($_) && $_->{'desc'};
71 '</TD></TR></TABLE></TD>'.
72 ( ++$count % $columns ? '' : '</TR><TR>')
74 } keys %rights ). '</TR></TABLE>'.
76 '* Global rights. These rights provide access to global data which is shared among all agents. Their use is not recommended for groups which are limited to a subset of agents.<BR>';