From 8a62381dee134979cd17e83351ebdc0d2b4bd006 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Thu, 11 Aug 2016 23:01:24 -0700 Subject: [PATCH] Ensure checkbox is checked when clicked Using a single checked attribute for this didn't work because clicking on it changed the state. Instead we have to create a new box for each case so it stays checked when clicked. --- .../components/objective-manage-competency.hbs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/templates/components/objective-manage-competency.hbs b/app/templates/components/objective-manage-competency.hbs index 09404e18c4..c5e25123be 100644 --- a/app/templates/components/objective-manage-competency.hbs +++ b/app/templates/components/objective-manage-competency.hbs @@ -6,7 +6,11 @@ {{#if (contains domain.id (map-by 'id' (await domainsWithNoChildren)))}}
  • - {{input type='checkbox' checked=(eq domain.id objective.competency.id)}} + {{#if (eq domain.id objective.competency.id)}} + + {{else}} + + {{/if}} {{domain.title}}
  • @@ -19,7 +23,11 @@ {{#each (sort-by 'title' (await domain.children)) as |competency|}} {{#if (contains competency.id (map-by 'id' (await competencies)))}}
  • - {{input type='checkbox' checked=(eq competency.id objective.competency.id)}} + {{#if (eq competency.id objective.competency.id)}} + + {{else}} + + {{/if}} {{competency.title}}
  • {{/if}}