Enhance point-of-order dialog

Escape and enter do what they should
This commit is contained in:
Sean 2021-05-25 15:15:08 +02:00
parent 4d4a3bb0db
commit fbb60cb0b6
2 changed files with 14 additions and 13 deletions

View File

@ -230,7 +230,8 @@ export class ListOfSpeakersContentComponent extends BaseViewComponentDirective i
PointOfOrderDialogComponent,
{
data: this.viewListOfSpeakers,
...infoDialogSettings
...infoDialogSettings,
disableClose: false
}
);

View File

@ -2,18 +2,18 @@
<span>{{ 'Are you sure you want to submit a point of order?' | translate }}</span>
</h2>
<form class="edit-form" [formGroup]="editForm" (ngSubmit)="onOk()">
<mat-dialog-content>
{{ 'Request' | translate }}:
<form class="edit-form" [formGroup]="editForm">
<mat-form-field>
<input matInput osAutofocus [maxLength]="MAX_LENGTH" formControlName="note" />
</mat-form-field>
</form>
{{ editForm.value.note.length }} / {{ MAX_LENGTH }}
</mat-dialog-content>
<mat-dialog-actions>
<button mat-button osAutofocus (click)="onOk()" color="accent" [disabled]="!this.editForm.valid">
<button type="submit" mat-button osAutofocus color="accent" [disabled]="!this.editForm.valid">
{{ 'OK' | translate }}
</button>
<button mat-button (click)="onCancel()">{{ 'Cancel' | translate }}</button>
<button type="button" mat-button (click)="onCancel()">{{ 'Cancel' | translate }}</button>
</mat-dialog-actions>
</form>