From dbb9ddd7d37e5b60d30a3b9edc043f0a0cd79496 Mon Sep 17 00:00:00 2001 From: Martin Filser Date: Sat, 15 Jan 2022 11:26:09 +0100 Subject: [PATCH] Show "newlineBecomesNewChecklistItem" element only at new checklist items - before it was shown at new checklists too --- client/components/cards/checklists.jade | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/components/cards/checklists.jade b/client/components/cards/checklists.jade index 779de0876..590b5e2eb 100644 --- a/client/components/cards/checklists.jade +++ b/client/components/cards/checklists.jade @@ -18,7 +18,7 @@ template(name="checklists") if canModifyCard +inlinedForm(autoclose=false classNames="js-add-checklist" cardId = cardId) - +addChecklistItemForm + +addChecklistItemForm(checklist=checklist showNewlineBecomesNewChecklistItem=false) else a.add-checklist.js-open-inlined-form(title="{{_ 'add-checklist'}}") i.fa.fa-plus @@ -56,9 +56,10 @@ template(name="addChecklistItemForm") .edit-controls.clearfix button.primary.confirm.js-submit-add-checklist-item-form(type="submit") {{_ 'save'}} a.fa.fa-times-thin.js-close-inlined-form - .material-toggle-switch(title="{{_ 'newlineBecomesNewChecklistItem'}}") - input.toggle-switch(type="checkbox" id="toggleNewlineBecomesNewChecklistItem") - label.toggle-label(for="toggleNewlineBecomesNewChecklistItem") + if showNewlineBecomesNewChecklistItem + .material-toggle-switch(title="{{_ 'newlineBecomesNewChecklistItem'}}") + input.toggle-switch(type="checkbox" id="toggleNewlineBecomesNewChecklistItem") + label.toggle-label(for="toggleNewlineBecomesNewChecklistItem") template(name="editChecklistItemForm") a.fa.fa-copy(title="{{_ 'copy-text-to-clipboard'}}") @@ -87,7 +88,7 @@ template(name="checklistItems") +checklistItemDetail(item = item checklist = checklist) if canModifyCard +inlinedForm(autoclose=false classNames="js-add-checklist-item" checklist = checklist) - +addChecklistItemForm + +addChecklistItemForm(checklist=checklist showNewlineBecomesNewChecklistItem=true) else a.add-checklist-item.js-open-inlined-form(title="{{_ 'add-checklist-item'}}") i.fa.fa-plus