Merge pull request #4668 from GabrielInTheWorld/fixes-checkbox
Fixes state of the checkboxes in amendments
This commit is contained in:
commit
5d64ea1519
@ -30,12 +30,15 @@
|
||||
*ngIf="multipleParagraphsAllowed"
|
||||
class="paragraph-select"
|
||||
[checked]="isParagraphSelected(paragraph)"
|
||||
></mat-checkbox>
|
||||
(click)="checkboxClicked($event)"
|
||||
>
|
||||
</mat-checkbox>
|
||||
<mat-radio-button
|
||||
*ngIf="!multipleParagraphsAllowed"
|
||||
class="paragraph-select"
|
||||
[checked]="isParagraphSelected(paragraph)"
|
||||
></mat-radio-button>
|
||||
>
|
||||
</mat-radio-button>
|
||||
<div class="paragraph-text motion-text" [innerHTML]="paragraph.safeHtml"></div>
|
||||
</section>
|
||||
</div>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user