beginning of prospect/CRM/contact work
[freeside.git] / httemplate / edit / access_user.html
index df580a2..73488ef 100644 (file)
@@ -1,9 +1,10 @@
 <% include( 'elements/edit.html',
-                 'name'   => 'Internal User',
+                 'name'   => 'Employee',
                  'table'  => 'access_user',
                  'fields' => [
                                'username',
                                { field=>'_password', type=>'password' },
+                               { field=>'_password2', type=>'password' },
                                'last',
                                'first',
                                { field=>'disabled', type=>'checkbox', value=>'Y' },
                                '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 {
                      my $access_user = shift;
 
-                     '<BR>Internal Access Groups<BR>'.
+                     '<BR>Employee Groups<BR>'.
                      ntable("#cccccc",2).
                      '<TR><TD>'.
                      include( '/elements/checkboxes-table.html',
@@ -37,3 +42,9 @@
                    },
            )
 %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+
+</%init>