mirror of https://github.com/ghostfolio/ghostfolio
committed by
Thomas
3 changed files with 61 additions and 34 deletions
@ -1,35 +1,39 @@ |
|||
<form #addAccessForm="ngForm" class="d-flex flex-column h-100"> |
|||
<h1 i18n mat-dialog-title>Grant access</h1> |
|||
<div class="flex-grow-1 py-3" mat-dialog-content> |
|||
<div> |
|||
<mat-form-field appearance="outline" class="w-100"> |
|||
<mat-label i18n>Alias</mat-label> |
|||
<input |
|||
matInput |
|||
name="alias" |
|||
type="text" |
|||
[(ngModel)]="data.access.alias" |
|||
/> |
|||
</mat-form-field> |
|||
<form |
|||
class="d-flex flex-column h-100" |
|||
[formGroup]="accessForm" |
|||
(keyup.enter)="accessForm.valid && onSubmit()" |
|||
(ngSubmit)="onSubmit()" |
|||
> |
|||
<h1 i18n mat-dialog-title>Grant access</h1> |
|||
<div class="flex-grow-1 py-3" mat-dialog-content> |
|||
<div> |
|||
<mat-form-field appearance="outline" class="w-100"> |
|||
<mat-label i18n>Alias</mat-label> |
|||
<input |
|||
formControlName="alias" |
|||
matInput |
|||
type="text" |
|||
/> |
|||
</mat-form-field> |
|||
</div> |
|||
<div> |
|||
<mat-form-field appearance="outline" class="w-100"> |
|||
<mat-label i18n>Type</mat-label> |
|||
<mat-select formControlName="type"> |
|||
<mat-option i18n value="PUBLIC">Public</mat-option> |
|||
</mat-select> |
|||
</mat-form-field> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<mat-form-field appearance="outline" class="w-100"> |
|||
<mat-label i18n>Type</mat-label> |
|||
<mat-select name="type" required [(value)]="data.access.type"> |
|||
<mat-option i18n value="PUBLIC">Public</mat-option> |
|||
</mat-select> |
|||
</mat-form-field> |
|||
<div class="justify-content-end" mat-dialog-actions> |
|||
<button i18n mat-button type="button" (click)="onCancel()">Cancel</button> |
|||
<button |
|||
color="primary" |
|||
mat-flat-button |
|||
type="submit" |
|||
[disabled]="!accessForm.valid" |
|||
> |
|||
<ng-container i18n>Save</ng-container> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
<div class="justify-content-end" mat-dialog-actions> |
|||
<button i18n mat-button (click)="onCancel()">Cancel</button> |
|||
<button |
|||
color="primary" |
|||
mat-flat-button |
|||
[disabled]="!addAccessForm.form.valid" |
|||
[mat-dialog-close]="data" |
|||
> |
|||
<ng-container i18n>Save</ng-container> |
|||
</button> |
|||
</div> |
|||
</form> |
|||
|
Loading…
Reference in new issue