X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Faccess_user.html;h=f40575c0bfc7f1961b30fcaa07fca6ea35544e02;hb=a284ef4c8d9d43db336a77db4c34996344cd5717;hp=cbced75b1b40d4c0854841c5bc9b3305d60986b0;hpb=9d69622a6bd83de2add9c2ba9accfe435993bbb1;p=freeside.git
diff --git a/httemplate/edit/access_user.html b/httemplate/edit/access_user.html
index cbced75b1..f40575c0b 100644
--- a/httemplate/edit/access_user.html
+++ b/httemplate/edit/access_user.html
@@ -2,34 +2,41 @@
'name' => 'Employee',
'table' => 'access_user',
'fields' => [
- 'username',
- { field=>'_password', type=>'password' },
- { field=>'_password2', type=>'password' },
- 'last',
- 'first',
- { field=>'user_custnum', type=>'search-cust_main', },
- { field=>'disabled', type=>'checkbox', value=>'Y' },
- ],
+ 'username',
+ @pw_fields,
+ 'last',
+ 'first',
+ { field=>'sched_item_enabled', type=>'checkbox', value=>'Y' },
+ { field=>'user_custnum', type=>'search-cust_main', },
+ { field => 'report_salesnum',
+ type => 'select-sales',
+ empty_label => 'all',
+ },
+ { field=>'disabled', type=>'checkbox', value=>'Y' },
+ ],
'labels' => {
- 'usernum' => 'User number',
- 'username' => 'Username',
- '_password' => 'Password',
- '_password2 '=> 'Re-enter Password',
- 'last' => 'Last name',
- 'first' => 'First name',
- 'user_custnum' => 'Customer (optional)',
- 'disabled' => 'Disable employee',
- },
- 'edit_callback' => sub { my( $c, $o ) = @_;
- $o->set('_password', '');
- },
+ 'usernum' => 'User number',
+ 'username' => 'Username',
+ '_password' => 'Password',
+ '_password2' => 'Re-enter Password',
+ 'last' => 'Last name',
+ 'first' => 'First name',
+ 'sched_item_enabled' => 'Installer',
+ 'user_custnum' => 'Customer (optional)',
+ 'report_salesnum' => 'Limit commission report to sales person',
+ 'disabled' => 'Disable employee',
+ },
+ 'edit_callback' => \&edit_callback,
+ 'field_callback'=> \&field_callback,
'viewall_dir' => 'browse',
'html_bottom' =>
sub {
my $access_user = shift;
- '
Employee Groups
'.
- ntable("#cccccc",2).
+ '
'.
+ 'Employee Groups'.
+ '
'.
+ '
'.
include( '/elements/checkboxes-table.html',
'source_obj' => $access_user,
@@ -44,6 +51,7 @@
},
'onsubmit' => 'check_user_custnum_search',
'html_foot' => $check_user_custnum_search,
+ 'html_table_class' => 'fsinnerbox',
)
%>
<%init>
@@ -51,6 +59,13 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+my @pw_fields =
+ FS::Auth->auth_class->can('change_password')
+ ? ( { field=>'_password', type=>'password' },
+ { field=>'_password2', type=>'password' },
+ )
+ : ();
+
my $check_user_custnum_search = < |