From 88592caa3957d91ce9ad9609dc6e6beac52d75ac Mon Sep 17 00:00:00 2001
From: Thomas Lenz <Thomas.Lenz@mni.thm.de>
Date: Sat, 31 Mar 2018 11:10:35 +0200
Subject: [PATCH] Change logic in template so that only single / multiple
 Choice checkbox is selected

---
 .../content-choice-creator.component.html            | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/app/components/fragments/content-choice-creator/content-choice-creator.component.html b/src/app/components/fragments/content-choice-creator/content-choice-creator.component.html
index 385777ae1..2e6767369 100644
--- a/src/app/components/fragments/content-choice-creator/content-choice-creator.component.html
+++ b/src/app/components/fragments/content-choice-creator/content-choice-creator.component.html
@@ -1,13 +1,13 @@
 <form (ngSubmit)="submitContent()">
   <section class="choice-section" fxLayout="row" fxLayoutAlign="center" fxLayoutGap="20px">
-    <div *ngIf="!multipleChoice">
-      <mat-checkbox color="primary" [(ngModel)]="singleChoice" name="singleChoice">Single choice</mat-checkbox>
-    </div>
-    <div *ngIf="!singleChoice">
-      <mat-checkbox color="primary" [(ngModel)]="multipleChoice" name="multiChoice">Multi choice</mat-checkbox>
-    </div>
+      <mat-checkbox (click)="singleChoice = true; multipleChoice = false" color="primary" [(ngModel)]="singleChoice" name="singleChoice">Single choice</mat-checkbox>
+      <mat-checkbox (click)="multipleChoice = true; singleChoice = false" color="primary" [(ngModel)]="multipleChoice" name="multiChoice">Multi choice</mat-checkbox>
   </section>
   <div *ngIf="singleChoice || multipleChoice">
+    <!--
+    <p *ngIf="singleChoice">Single choice selected</p>
+    <p *ngIf="multipleChoice">Multiple choice selected</p>
+    -->
     <mat-form-field class="input-block">
       <input matInput #subject [(ngModel)]="content.subject" placeholder="Subject" name="subject">
     </mat-form-field>
-- 
GitLab