diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts index eed0365a7..f4699f83d 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/app-routing.module.ts @@ -49,6 +49,7 @@ const routes: Routes = [ {path: 'list', component: ManageUsersListComponent}, {path: 'add', component: ManageUsersAddComponent}, {path: 'edit/:userid', component: ManageUsersEditComponent}, + {path: 'edit', redirectTo:'edit/guest' }, {path: '', redirectTo:'list', pathMatch:'full'} ] }, diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/manage-users/manage-users.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/manage-users/manage-users.component.html index 08b3fca81..5eb66fd27 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/manage-users/manage-users.component.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/manage-users/manage-users.component.html @@ -25,7 +25,7 @@ {{'users.add.head' |translate }} diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.ts b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.ts index 6a50028b7..60649fc8c 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.ts +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-add/manage-users-add.component.ts @@ -26,6 +26,7 @@ import {HttpErrorResponse} from "@angular/common/http"; import {ErrorResult} from "../../../../model/error-result"; import {catchError} from "rxjs/operators"; import {of, throwError} from 'rxjs'; +import {environment} from "../../../../../environments/environment"; @Component({ selector: 'app-manage-users-add', @@ -34,7 +35,7 @@ import {of, throwError} from 'rxjs'; }) export class ManageUsersAddComponent implements OnInit { - minUserIdSize=8; + minUserIdSize=environment.application.minUserIdLength; success:boolean=false; error:boolean=false; errorResult:ErrorResult; @@ -53,7 +54,7 @@ export class ManageUsersAddComponent implements OnInit { validator: MustMatch('password', 'confirm_password') }) - constructor(private userService: UserService, private fb: FormBuilder) { + constructor(public userService: UserService, public fb: FormBuilder) { } @@ -97,16 +98,16 @@ export class ManageUsersAddComponent implements OnInit { } - valid(field:string) : string { + valid(field:string) : string[] { let formField = this.userForm.get(field); if (formField.dirty||formField.touched) { if (formField.valid) { - return 'is-valid' + return ['is-valid'] } else { - return 'is-invalid' + return ['is-invalid'] } } else { - return '' + return [''] } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html index c70355ad2..f929de210 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/archiva-web/src/app/modules/user/users/manage-users-edit/manage-users-edit.component.html @@ -17,56 +17,75 @@ -->
-
- - +
Edit
+
+ +
+
+
+ +
+ - {{'users.input.small.user_id'|translate:{'minSize':this.minUserIdSize} }} + value="{{editUser.user_id}}" [attr.readonly]="!editMode"> + {{'users.input.small.user_id'|translate:{'minSize':this.minUserIdSize} }} +
-
- - - {{'users.input.small.full_name'|translate}} +
+ +
+ + {{'users.input.small.full_name'|translate}} +
-
- - +
+ +
+ +
-
- +
+ +
+
-
- +
+ +
+
-
+
+
Flags
+
- -
- +
+
-
+
+ [disabled]="!userForm.valid">{{'users.edit.submit'|translate}}