1 <% include( 'elements/edit.html',
3 'table' => 'access_user',
9 { field=>'user_custnum', type=>'search-cust_main', },
10 { field=>'disabled', type=>'checkbox', value=>'Y' },
13 'usernum' => 'User number',
14 'username' => 'Username',
15 '_password' => 'Password',
16 '_password2' => 'Re-enter Password',
17 'last' => 'Last name',
18 'first' => 'First name',
19 'user_custnum' => 'Customer (optional)',
20 'disabled' => 'Disable employee',
22 'edit_callback' => \&edit_callback,
23 'field_callback'=> \&field_callback,
24 'viewall_dir' => 'browse',
27 my $access_user = shift;
29 '<BR>Employee Groups<BR>'.
32 include( '/elements/checkboxes-table.html',
33 'source_obj' => $access_user,
34 'link_table' => 'access_usergroup',
35 'target_table' => 'access_group',
36 'name_col' => 'groupname',
37 'target_link' => $p.'edit/access_group.html?',
43 'onsubmit' => 'check_user_custnum_search',
44 'html_foot' => $check_user_custnum_search,
50 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
53 FS::Auth->auth_class->can('change_password')
54 ? ( { field=>'_password', type=>'password' },
55 { field=>'_password2', type=>'password' },
59 my $check_user_custnum_search = <<END;
60 <SCRIPT TYPE="text/javascript">
61 function check_user_custnum_search(what) {
62 while ( user_custnum_search_active ) {
63 // javascript needs ambien
71 my ($c, $o, $f, $opt) = @_;
72 $o->set('_password', '');
77 if($f->{'type'} eq 'password' and $o->is_system_user) {
78 $f->{'type'} = 'hidden';