1 <% include( 'elements/edit.html',
3 'table' => 'access_user',
6 { field=>'_password', type=>'password' },
7 { field=>'_password2', type=>'password' },
10 { field=>'user_custnum', type=>'search-cust_main', },
11 { field=>'report_salesnum', type=>'select-sales', empty_label=>'all', },
12 { field=>'disabled', type=>'checkbox', value=>'Y' },
15 'usernum' => 'User number',
16 'username' => 'Username',
17 '_password' => 'Password',
18 '_password2' => 'Re-enter Password',
19 'last' => 'Last name',
20 'first' => 'First name',
21 'user_custnum' => 'Customer (optional)',
22 'report_salesnum' => 'Limit commission report to sales person',
23 'disabled' => 'Disable employee',
25 'edit_callback' => \&edit_callback,
26 'field_callback'=> \&field_callback,
27 'viewall_dir' => 'browse',
30 my $access_user = shift;
32 '<BR>Employee Groups<BR>'.
35 include( '/elements/checkboxes-table.html',
36 'source_obj' => $access_user,
37 'link_table' => 'access_usergroup',
38 'target_table' => 'access_group',
39 'name_col' => 'groupname',
40 'target_link' => $p.'edit/access_group.html?',
46 'onsubmit' => 'check_user_custnum_search',
47 'html_foot' => $check_user_custnum_search,
53 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
55 my $check_user_custnum_search = <<END;
56 <SCRIPT TYPE="text/javascript">
57 function check_user_custnum_search(what) {
58 while ( user_custnum_search_active ) {
59 // javascript needs ambien
67 my ($cgi, $access_user, $fields_listref, $opt_hashref) = @_;
68 $access_user->_password('');
73 if($f->{'type'} eq 'password' and $o->is_system_user) {
74 $f->{'type'} = 'hidden';