-<%= include( 'elements/edit.html',
+<% include( 'elements/edit.html',
'name' => 'Internal User',
'table' => 'access_user',
'fields' => [
'username',
{ field=>'_password', type=>'password' },
+ { field=>'_password2', type=>'password' },
'last',
'first',
+ { field=>'disabled', type=>'checkbox', value=>'Y' },
],
'labels' => {
'usernum' => 'User number',
'username' => 'Username',
'_password' => 'Password',
+ '_password2'=> 'Re-enter Password',
'last' => 'Last name',
'first' => 'First name',
+ 'disabled' => 'Disable employee',
},
+ 'edit_callback' => sub { my( $c, $o ) = @_;
+ $o->set('_password', '');
+ },
'viewall_dir' => 'browse',
'html_bottom' =>
sub {
},
)
%>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>