hermes-web-angular/src/app/groups/group-item-edit/group-item-edit.component.html

61 lines
1.9 KiB
HTML

<mat-card>
<mat-card-header>
<mat-card-title-group>
<mat-card-title>Edit Group</mat-card-title>
</mat-card-title-group>
</mat-card-header>
<mat-card-content>
<mat-form-field>
<mat-label>Group Name</mat-label>
<input matInput
type="text"
[formControl]="nameForm"
[disabled]="isSpecial" />
@if (nameForm.invalid && (nameForm.dirty || nameForm.touched)) {
@if (nameForm.hasError('required')) {
<small class="error">This field is required.</small>
}
}
</mat-form-field>
<mat-form-field>
<mat-label>TTS Priority</mat-label>
<input matInput
type="number"
[formControl]="priorityForm" />
@if (priorityForm.invalid && (priorityForm.dirty || priorityForm.touched)) {
@if (priorityForm.hasError('required')) {
<small class="error">This field is required.</small>
}
@if (priorityForm.hasError('min')) {
<small class="error">This field must be greater than -2147483649.</small>
}
@if (priorityForm.hasError('max')) {
<small class="error">This field must be smaller than 2147483648.</small>
}
@if (priorityForm.hasError('integer') && !priorityForm.hasError('min') && !priorityForm.hasError('max')) {
<small class="error">This field must be an integer.</small>
}
}
</mat-form-field>
</mat-card-content>
<mat-card-actions>
<button mat-button
class="neutral"
[disabled]="waitForResponse"
(click)="cancel()">
<mat-icon>cancel</mat-icon>Cancel
</button>
<button mat-button
class="confirm"
[disabled]="waitForResponse || formGroup.invalid"
(click)="add()">
<mat-icon>add</mat-icon>Add
</button>
</mat-card-actions>
@if (responseError) {
<mat-card-footer>
<small class="error below">{{responseError}}</small>
</mat-card-footer>
}
</mat-card>