X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Faccess_user.html;h=86ce25374caea144656777208a5063c885edb7fd;hb=928a126034e99d99420a1cf1a7eb551e1e1d320d;hp=1f52b478931ed4a0349f48a71fa578e1b8406c27;hpb=548bde0209edab634e5b2ea919e4a2096607d2d0;p=freeside.git diff --git a/httemplate/edit/access_user.html b/httemplate/edit/access_user.html index 1f52b4789..86ce25374 100644 --- a/httemplate/edit/access_user.html +++ b/httemplate/edit/access_user.html @@ -14,15 +14,14 @@ 'usernum' => 'User number', 'username' => 'Username', '_password' => 'Password', - '_password2 '=> 'Re-enter 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', ''); - }, + 'edit_callback' => \&edit_callback, + 'field_callback'=> \&field_callback, 'viewall_dir' => 'browse', 'html_bottom' => sub { @@ -42,6 +41,8 @@ '' ; }, + 'onsubmit' => 'check_user_custnum_search', + 'html_foot' => $check_user_custnum_search, ) %> <%init> @@ -49,4 +50,28 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $check_user_custnum_search = < + function check_user_custnum_search(what) { + while ( user_custnum_search_active ) { + // javascript needs ambien + } + return true; + } + +END + +sub edit_callback { + my ($c, $o, $f, $opt) = @_; + $o->set('_password', ''); +} + +sub field_callback { + my ($c, $o, $f) = @_; + if($f->{'type'} eq 'password' and $o->is_system_user) { + $f->{'type'} = 'hidden'; + $f->{'disabled'} = 1; + } +} +