From e6c4e1d27bfe7f151cfa9e0babe0f44fff123054 Mon Sep 17 00:00:00 2001 From: GabrielMeyer Date: Tue, 7 May 2019 15:58:36 +0200 Subject: [PATCH] Fixes state of the checkboxes in amendments --- .../amendment-create-wizard.component.html | 7 +++++-- .../amendment-create-wizard.component.ts | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html index 20fa05416..b444876fb 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html +++ b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.html @@ -30,12 +30,15 @@ *ngIf="multipleParagraphsAllowed" class="paragraph-select" [checked]="isParagraphSelected(paragraph)" - > + (click)="checkboxClicked($event)" + > + + > +
diff --git a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts index b910b51a3..2f0443cc7 100644 --- a/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/motions/modules/motion-detail/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -117,6 +117,16 @@ export class AmendmentCreateWizardComponent extends BaseViewComponent { return !!this.contentForm.value.selectedParagraphs.find(para => para.paragraphNo === paragraph.paragraphNo); } + /** + * Function to prevent executing the click event of a checkbox. + * This prevents that the state of the checkbox is not changed by clicking it. + * + * @param event The `MouseEvent` + */ + public checkboxClicked(event: MouseEvent): void { + event.preventDefault(); + } + /** * Called by the template when a paragraph is clicked in single paragraph mode. * Behaves like a radio-button