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"
|
*ngIf="multipleParagraphsAllowed"
|
||||||
class="paragraph-select"
|
class="paragraph-select"
|
||||||
[checked]="isParagraphSelected(paragraph)"
|
[checked]="isParagraphSelected(paragraph)"
|
||||||
></mat-checkbox>
|
(click)="checkboxClicked($event)"
|
||||||
|
>
|
||||||
|
</mat-checkbox>
|
||||||
<mat-radio-button
|
<mat-radio-button
|
||||||
*ngIf="!multipleParagraphsAllowed"
|
*ngIf="!multipleParagraphsAllowed"
|
||||||
class="paragraph-select"
|
class="paragraph-select"
|
||||||
[checked]="isParagraphSelected(paragraph)"
|
[checked]="isParagraphSelected(paragraph)"
|
||||||
></mat-radio-button>
|
>
|
||||||
|
</mat-radio-button>
|
||||||
<div class="paragraph-text motion-text" [innerHTML]="paragraph.safeHtml"></div>
|
<div class="paragraph-text motion-text" [innerHTML]="paragraph.safeHtml"></div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -117,6 +117,16 @@ export class AmendmentCreateWizardComponent extends BaseViewComponent {
|
|||||||
return !!this.contentForm.value.selectedParagraphs.find(para => para.paragraphNo === paragraph.paragraphNo);
|
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.
|
* Called by the template when a paragraph is clicked in single paragraph mode.
|
||||||
* Behaves like a radio-button
|
* Behaves like a radio-button
|
||||||
|
Loading…
Reference in New Issue
Block a user