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.
50 lines
1.4 KiB
50 lines
1.4 KiB
<form
|
|
class="d-flex flex-column h-100"
|
|
[formGroup]="platformForm"
|
|
(keyup.enter)="platformForm.valid && onSubmit()"
|
|
(ngSubmit)="onSubmit()"
|
|
>
|
|
<h1 *ngIf="data.platform.id" i18n mat-dialog-title>Update platform</h1>
|
|
<h1 *ngIf="!data.platform.id" i18n mat-dialog-title>Add platform</h1>
|
|
<div class="flex-grow-1 py-3" mat-dialog-content>
|
|
<div>
|
|
<mat-form-field appearance="outline" class="w-100">
|
|
<mat-label i18n>Name</mat-label>
|
|
<input
|
|
formControlName="name"
|
|
matInput
|
|
(keydown.enter)="$event.stopPropagation()"
|
|
/>
|
|
</mat-form-field>
|
|
</div>
|
|
<div>
|
|
<mat-form-field appearance="outline" class="w-100">
|
|
<mat-label i18n>Url</mat-label>
|
|
<input
|
|
formControlName="url"
|
|
matInput
|
|
(keydown.enter)="$event.stopPropagation()"
|
|
/>
|
|
@if (data.platform.url) {
|
|
<gf-asset-profile-icon
|
|
class="mr-3"
|
|
matSuffix
|
|
[url]="data.platform.url"
|
|
/>
|
|
}
|
|
</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]="!platformForm.valid"
|
|
>
|
|
<ng-container i18n>Save</ng-container>
|
|
</button>
|
|
</div>
|
|
</form>
|