Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

80 lines
3.4 KiB

<sqx-title message="User Management"></sqx-title>
<form [formGroup]="userForm.form" (ngSubmit)="save()">
<input style="display:none" type="password" name="foilautofill"/>
<sqx-panel desiredWidth="26rem" isBlank="true" [isLazyLoaded]="false">
<ng-container title>
<ng-container *ngIf="usersState.selectedUser | async; else noUserTitle">
Edit User
</ng-container>
<ng-template #noUserTitle>
New User
</ng-template>
</ng-container>
<ng-container menu>
<ng-container *ngIf="usersState.selectedUser | async; else noUserMenu">
<button type="submit" class="btn btn-primary" title="CTRL + S">
Save
</button>
<sqx-shortcut keys="ctrl+s" (trigger)="save()"></sqx-shortcut>
</ng-container>
<ng-template #noUserMenu>
<button type="submit" class="btn btn-primary" title="CTRL + S">
Save
</button>
<sqx-shortcut keys="ctrl+s" (trigger)="save()"></sqx-shortcut>
</ng-template>
</ng-container>
<ng-container content>
<sqx-form-error [error]="userForm.error | async"></sqx-form-error>
<div class="form-group">
<label for="email">Email <small class="hint">(required)</small></label>
<sqx-control-errors for="email" [submitted]="userForm.submitted | async"></sqx-control-errors>
<input type="email" class="form-control" id="email" maxlength="100" formControlName="email" autocomplete="false" />
</div>
<div class="form-group">
<label for="displayName">Display Name <small class="hint">(required)</small></label>
<sqx-control-errors for="displayName" [submitted]="userForm.submitted | async"></sqx-control-errors>
<input type="text" class="form-control" id="displayName" maxlength="100" formControlName="displayName" autocomplete="false" spellcheck="false" />
</div>
<div class="form-group form-group-password">
<div class="form-group">
<label for="password">Password</label>
<sqx-control-errors for="password" [submitted]="userForm.submitted | async"></sqx-control-errors>
<input type="password" class="form-control" id="password" maxlength="100" formControlName="password" autocomplete="false" />
</div>
<div class="form-group">
<label for="password">Confirm Password</label>
<sqx-control-errors for="passwordConfirm" [submitted]="userForm.submitted | async"></sqx-control-errors>
<input type="password" class="form-control" id="passwordConfirm" maxlength="100" formControlName="passwordConfirm" autocomplete="false" />
</div>
</div>
<div class="form-group form-group-permissions">
<label for="permissions">Permissions</label>
<sqx-control-errors for="permissions" [submitted]="userForm.submitted | async"></sqx-control-errors>
<textarea class="form-control" id="permissions" formControlName="permissions" placeholder="Separate by line" autocomplete="false" spellcheck="false"></textarea>
</div>
</ng-container>
</sqx-panel>
</form>