X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Faccess_group.html;h=b5757afca0121420c77898562557115fbed7f4b8;hb=44158be319024c0f55be4a2f72f79c6c73dc9c54;hp=11b8df7bc1b558f5a9abc13500d37e9753d8ae79;hpb=2c757d7db4cb6a7b9655de13206fcc84fb7ce61f;p=freeside.git
diff --git a/httemplate/edit/access_group.html b/httemplate/edit/access_group.html
index 11b8df7bc..b5757afca 100644
--- a/httemplate/edit/access_group.html
+++ b/httemplate/edit/access_group.html
@@ -1,10 +1,83 @@
-<%= include( 'elements/edit.html',
- 'name' => 'Internal Access Group',
- 'table' => 'access_group',
- 'labels' => {
- 'groupnum' => 'Group number',
- 'groupname' => 'Group name',
- },
- 'viewall_dir' => 'browse',
- )
+<% include( 'elements/edit.html',
+ 'name' => 'Employee Group',
+ 'table' => 'access_group',
+ 'labels' => {
+ 'groupnum' => 'Group number',
+ 'groupname' => 'Group name',
+ },
+
+ 'viewall_dir' => 'browse',
+
+ 'html_bottom' => $html_bottom_sub,
+ )
%>
+<%once>
+
+tie my %rights, 'Tie::IxHash', FS::AccessRight->rights_info;
+
+%once>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+my $html_bottom_sub = sub {
+ my $access_group = shift;
+
+ #some false laziness w/browse/access_group.html
+ my $columns = 3;
+ my $count = 0;
+
+ '
'.
+ 'Group limited to these agent(s)
'.
+ 'Employees in this group will only see customers of the selected agents in the system and reports.
'.
+ ntable("#cccccc",2).
+ '
'. $_. ' |
---|
'.
+ include( '/elements/checkboxes-table-name.html',
+ 'source_obj' => $access_group,
+ 'link_table' => 'access_right',
+ 'link_static' => { 'righttype' =>
+ 'FS::access_group',
+ },
+ 'num_col' => 'rightobjnum',
+ 'name_col' => 'rightname',
+ 'names_list' => [ map {
+ my $rn =
+ ref($_) ? $_->{'rightname'} : $_;
+ my %hash = ();
+ $hash{'note'} = ' *'
+ if ref($_) && $_->{'global'};
+ $hash{'desc'} = $_->{'desc'}
+ if ref($_) && $_->{'desc'};
+ [ $rn => \%hash ];
+ }
+ @{ $rights{$_} }
+ ],
+ ).
+ ' '. + ' |