frontend permissions dialogs

This commit is contained in:
Michael Shamoon
2022-11-13 22:58:07 -08:00
parent 0194b0ac95
commit 277402a26d
13 changed files with 164 additions and 82 deletions

View File

@@ -11,19 +11,21 @@
<app-input-text i18n-title title="First name" formControlName="first_name" [error]="error?.first_name"></app-input-text>
<app-input-text i18n-title title="Last name" formControlName="last_name" [error]="error?.first_name"></app-input-text>
<div class="form-check form-switch">
<input type="checkbox" class="form-check-input" id="is_active" formControlName="is_active">
<label class="form-check-label" for="is_active" i18n>Active</label>
<div class="mb-2">
<div class="form-check form-switch form-check-inline">
<input type="checkbox" class="form-check-input" id="is_active" formControlName="is_active">
<label class="form-check-label" for="is_active" i18n>Active</label>
</div>
<div class="form-check form-switch form-check-inline">
<input type="checkbox" class="form-check-input" id="is_superuser" formControlName="is_superuser">
<label class="form-check-label" for="is_superuser" i18n>Superuser</label>
</div>
</div>
<div class="form-check form-switch">
<input type="checkbox" class="form-check-input" id="is_superuser" formControlName="is_superuser">
<label class="form-check-label" for="is_superuser" i18n>Superuser</label>
</div>
<app-input-select i18n-title title="Groups" [items]="groups" multiple="true" formControlName="groups"></app-input-select>
</div>
<div class="col">
<app-input-select i18n-title title="Groups" [items]="groups" multiple="true" formControlName="groups"></app-input-select>
<app-permissions-select i18n-title title="Permissions" formControlName="permissions"></app-permissions-select>
<app-permissions-select i18n-title title="Permissions" formControlName="user_permissions" [error]="error?.user_permissions"></app-permissions-select>
</div>
</div>
</div>

View File

@@ -42,10 +42,10 @@ export class UserEditDialogComponent extends EditDialogComponent<PaperlessUser>
username: new FormControl(''),
first_name: new FormControl(''),
last_name: new FormControl(''),
is_active: new FormControl(''),
is_superuser: new FormControl(''),
groups: new FormControl(''),
permissions: new FormControl(''),
is_active: new FormControl(null),
is_superuser: new FormControl(null),
groups: new FormControl(null),
user_permissions: new FormControl(null),
})
}
}