Skip to content

Commit 3220fc0

Browse files
DOC-5065 fixes to checklist shortcodes
1 parent 24c9f39 commit 3220fc0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

layouts/shortcodes/checklist-item.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<li>
2-
<select onchange="clChange('prodlist')">
2+
{{- with .Parent }}
3+
<select onchange="clChange('{{ .Get 0 }}')">
4+
{{- end }}
35
<option value="R">&#x274C;</option>
46
<option value="G">&#9989;</option>
57
<option value="A">&#x1F50D;</option>
68
<option value="X">&#x2205;</option>
79
</select>
8-
{{- if index .Params 0 -}}
10+
{{- if .Get 0 -}}
911
<a href="{{ index .Params 0 }}">{{ .Inner }}</a>
1012
{{- else -}}
1113
{{ .Inner }}

layouts/shortcodes/checklist.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ $formId := index .Params 0 }}
1+
{{ $formId := .Get 0 }}
22
<form id="{{ $formId }}">
33
<ul style="list-style-type: none;padding-left: 0px;">
44
{{ .Inner }}
@@ -17,7 +17,7 @@
1717
document.addEventListener('DOMContentLoaded', () => {
1818
let itemString = localStorage.getItem("{{ $formId }}");
1919

20-
if (itemString !== "") {
20+
if (itemString) {
2121
setCLItemsFromString("{{ $formId }}", itemString);
2222
} else {
2323
clChange("{{ $formId }}");

0 commit comments

Comments
 (0)