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=>'disabled', type=>'checkbox', value=>'Y' },
14 'usernum' => 'User number',
15 'username' => 'Username',
16 '_password' => 'Password',
17 '_password2' => 'Re-enter Password',
18 'last' => 'Last name',
19 'first' => 'First name',
20 'user_custnum' => 'Customer (optional)',
21 'disabled' => 'Disable employee',
23 'edit_callback' => \&edit_callback,
24 'field_callback'=> \&field_callback,
25 'viewall_dir' => 'browse',
28 my $access_user = shift;
30 '<BR>Employee Groups<BR>'.
33 include( '/elements/checkboxes-table.html',
34 'source_obj' => $access_user,
35 'link_table' => 'access_usergroup',
36 'target_table' => 'access_group',
37 'name_col' => 'groupname',
38 'target_link' => $p.'edit/access_group.html?',
44 'onsubmit' => 'check_user_custnum_search',
45 'html_foot' => $check_user_custnum_search,
51 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
53 my $check_user_custnum_search = <<END;
54 <SCRIPT TYPE="text/javascript">
55 function check_user_custnum_search(what) {
56 while ( user_custnum_search_active ) {
57 // javascript needs ambien
65 my ($c, $o, $f, $opt) = @_;
66 $o->set('_password', '');
71 if($f->{'type'} eq 'password' and $o->is_system_user) {
72 $f->{'type'} = 'hidden';