2023-01-26 10:55:02 +01:00
|
|
|
<form [formGroup]="contentForm" (ngSubmit)="onSubmit()">
|
2023-01-25 16:08:32 +01:00
|
|
|
|
2023-01-26 10:55:02 +01:00
|
|
|
<h1 mat-dialog-title>Edit content</h1>
|
2023-01-25 16:08:32 +01:00
|
|
|
|
2023-01-26 10:55:02 +01:00
|
|
|
<div mat-dialog-content>
|
|
|
|
|
2023-02-02 09:37:24 +01:00
|
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
2023-01-26 10:55:02 +01:00
|
|
|
<mat-label>ID</mat-label>
|
2023-01-26 11:14:41 +01:00
|
|
|
<input matInput readonly value="{{data.id}}"/>
|
2023-01-26 10:55:02 +01:00
|
|
|
</mat-form-field>
|
|
|
|
|
2023-02-02 09:37:24 +01:00
|
|
|
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
|
2023-01-26 10:55:02 +01:00
|
|
|
<mat-label>Content ({{data.contentType}})</mat-label>
|
2023-01-26 11:14:41 +01:00
|
|
|
<textarea matInput formControlName="content" required rows="16" style="font-size: 0.8em;"></textarea>
|
2023-01-26 10:55:02 +01:00
|
|
|
<mat-error *ngIf="contentForm.get('content')?.invalid">This field is <strong>required</strong></mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div mat-dialog-actions>
|
|
|
|
<button mat-stroked-button color="primary" type="submit" [disabled]="!contentForm.valid">Submit</button>
|
|
|
|
<button mat-stroked-button color="primary" mat-dialog-close>Close</button>
|
2023-01-26 12:21:50 +01:00
|
|
|
<mat-error *ngIf="contentForm.errors?.['serverError']">
|
|
|
|
{{ contentForm.errors?.['serverError'] }}
|
|
|
|
</mat-error>
|
2023-01-26 10:55:02 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
</form>
|