2019-06-05 16:07:36 +02:00
< form class = "d-flex user-role-editor" [ formGroup ] = " formGroup " ( ngSubmit ) = " formSubmit ( ) " >
2020-12-04 17:26:20 +01:00
< div * ngIf = "!this.nowEditing" class = "roles" >
2021-04-07 09:25:03 +02:00
< div * ngFor = "let role of this.formGroup.get('appRoles').value" [ ngClass ] = " { ' user ' : role = = 0 , ' manager ' : role = = 1 , ' admin ' : role = = 2 , ' dataset-template-editor ' : role = = 3 } " >
2020-12-04 17:26:20 +01:00
{{getPrincipalAppRoleWithLanguage(role)}}
< / div >
< / div >
< mat-form-field * ngIf = "this.nowEditing" class = "select-role roles-width-180" >
2018-10-05 17:00:54 +02:00
< mat-select formControlName = "appRoles" multiple required >
2018-02-01 15:04:36 +01:00
< mat-option * ngFor = "let role of getPrincipalAppRoleValues()" [ value ] = " role " > {{getPrincipalAppRoleWithLanguage(role)}}< / mat-option >
< / mat-select >
2018-11-27 18:33:17 +01:00
< mat-error * ngIf = "getFormControl('appRoles').hasError('required')" > {{'GENERAL.VALIDATION.REQUIRED' | translate}}< / mat-error >
2018-02-01 15:04:36 +01:00
< / mat-form-field >
< button * ngIf = "!this.nowEditing" mat-icon-button color = "primary" type = "button" ( click ) = " editItem ( ) " >
2020-12-04 17:26:20 +01:00
<!-- <mat - icon class="mat - 24">edit</mat - icon> -->
< span class = "row-action" > {{'USERS.ACTIONS.EDIT' | translate}}< / span >
2018-02-01 15:04:36 +01:00
< / button >
< button * ngIf = "this.nowEditing" mat-icon-button color = "primary" type = "submit" >
2020-12-04 17:26:20 +01:00
<!-- <mat - icon class="mat - 24">save</mat - icon> -->
< span class = "row-action" > {{'USERS.ACTIONS.SAVE' | translate}}< / span >
2018-02-01 15:04:36 +01:00
< / button >
2018-10-05 17:00:54 +02:00
< / form >