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

31 lines
1.2 KiB
HTML
Raw Normal View History

2023-01-26 10:55:02 +01:00
<form [formGroup]="newResourceForm" (ngSubmit)="onSubmit()">
<h1 mat-dialog-title>New Resource</h1>
2023-01-25 16:08:32 +01:00
2023-01-26 10:55:02 +01:00
<div mat-dialog-content>
2023-01-25 16:08:32 +01:00
2023-01-26 10:55:02 +01:00
<mat-form-field appearance="fill" style="width: 100%;">
<mat-label>Name</mat-label>
<input matInput formControlName="name" required />
<mat-error *ngIf="newResourceForm.get('name')?.invalid">This field is <strong>required</strong></mat-error>
</mat-form-field>
<mat-form-field appearance="fill" style="width: 100%;">
<mat-label>Description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field>
<mat-form-field appearance="fill" style="width: 100%;">
<mat-label>Content ({{data.contentType}})</mat-label>
<textarea matInput formControlName="content" rows="10" required style="font-size: 0.8em;"></textarea>
<mat-error *ngIf="newResourceForm.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]="!newResourceForm.valid">Submit</button>
<button mat-stroked-button color="primary" mat-dialog-close>Close</button>
</div>
</form>