1 <% include( 'elements/edit.html',
2 'name' => 'Employee 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;
22 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
24 my $html_bottom_sub = sub {
25 my $access_group = shift;
27 #some false laziness w/browse/access_group.html
32 '<FONT SIZE="+1">Group limited to these agent(s)</FONT><BR>'.
33 'Employees in this group will only see customers of the selected agents in the system and reports.<BR>'.
36 include( '/elements/checkboxes-table.html',
37 'source_obj' => $access_group,
38 'link_table' => 'access_groupagent',
39 'target_table' => 'agent',
40 'name_col' => 'agent',
41 'target_link' => $p.'edit/agent.cgi?',
46 '<BR><FONT SIZE="+1">Group access rights</FONT><BR>'.
47 include('/elements/table-grid.html', bgcolor=>'#cccccc' ).
48 '<TR>'. join( '', map {
49 '<TD CLASS="inv" VALIGN="top"><TABLE BGCOLOR="#cccccc" WIDTH=100%>'.
50 '<TR><TH BGCOLOR="#dcdcdc">'. $_. '</TH></TR>'.
52 include( '/elements/checkboxes-table-name.html',
53 'source_obj' => $access_group,
54 'link_table' => 'access_right',
55 'link_static' => { 'righttype' =>
58 'num_col' => 'rightobjnum',
59 'name_col' => 'rightname',
60 'names_list' => [ map {
62 ref($_) ? $_->{'rightname'} : $_;
64 $hash{'note'} = ' *'
65 if ref($_) && $_->{'global'};
66 $hash{'desc'} = $_->{'desc'}
67 if ref($_) && $_->{'desc'};
74 '</TD></TR></TABLE></TD>'.
75 ( ++$count % $columns ? '' : '</TR><TR>')
77 } keys %rights ). '</TR></TABLE>'.
79 '* 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>';