dnet-applications/frontends/dnet-is-application/src/app/resources/metadata-dialog.html

37 lines
1.3 KiB
HTML
Raw Normal View History

2023-01-25 16:08:32 +01:00
<form [formGroup]="metadataForm" (ngSubmit)="onSubmit()">
2023-02-08 15:36:13 +01:00
<h1 mat-dialog-title>Edit metadata</h1>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<div mat-dialog-content>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
<mat-label>ID</mat-label>
<input matInput readonly value="{{data.id}}" />
</mat-form-field>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
<mat-label>Type</mat-label>
<input matInput readonly value="{{data.type}}" />
</mat-form-field>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
<mat-label>Name</mat-label>
<input matInput formControlName="name" required />
<mat-error *ngIf="metadataForm.get('name')?.invalid">This field is <strong>required</strong></mat-error>
</mat-form-field>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<mat-form-field appearance="fill" floatLabel="always" style="width: 100%;">
<mat-label>Description</mat-label>
<textarea matInput formControlName="description" rows="8"></textarea>
</mat-form-field>
</div>
2023-01-25 16:08:32 +01:00
2023-02-08 15:36:13 +01:00
<div mat-dialog-actions>
<button mat-stroked-button color="primary" type="submit" [disabled]="!metadataForm.valid">Submit</button>
<button mat-stroked-button color="primary" mat-dialog-close>Close</button>
<mat-error *ngIf="metadataForm.errors?.['serverError']">
{{ metadataForm.errors?.['serverError'] }}
</mat-error>
</div>
2023-01-25 16:08:32 +01:00
</form>