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.
69 lines
2.0 KiB
69 lines
2.0 KiB
<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"
|
|
(keydown.enter)="$event.stopPropagation()"
|
|
/>
|
|
</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="PRIVATE">Private</mat-option>
|
|
<mat-option i18n value="PUBLIC">Public</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
@if (accessForm.get('type').value === 'PRIVATE') {
|
|
<div>
|
|
<mat-form-field appearance="outline" class="w-100">
|
|
<mat-label i18n>Permission</mat-label>
|
|
<mat-select formControlName="permissions">
|
|
<mat-option i18n value="READ_RESTRICTED"
|
|
>Restricted view</mat-option
|
|
>
|
|
<mat-option i18n value="READ">View</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
<div>
|
|
<mat-form-field appearance="outline" class="w-100">
|
|
<mat-label>
|
|
Ghostfolio <ng-container i18n>User ID</ng-container>
|
|
</mat-label>
|
|
<input
|
|
formControlName="userId"
|
|
matInput
|
|
type="text"
|
|
(keydown.enter)="$event.stopPropagation()"
|
|
/>
|
|
</mat-form-field>
|
|
</div>
|
|
}
|
|
</div>
|
|
<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>
|
|
</form>
|