forked from platform-coop-toolkit/pinecone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: checkbox IDs properly set using values from template configuration
- Loading branch information
Showing
5 changed files
with
66 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/components/10-atoms/100-form-elements/_checkbox/_checkbox--unwrapped.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<input {% if className %}class="{{ className }}"{% endif %} id="{{ value if value else label | slugify }}" type="checkbox" name="{{ name }}" value="{{ value if value else label | slugify }}"{{ ' checked' if checked }}{{ ' disabled' if disabled }} /><label for="{{ value if value else label | slugify }}">{{ label }}</label> | ||
<input {% if className %}class="{{ className }}"{% endif %} id="{{ value | slugify if value else label | slugify }}" type="checkbox" name="{{ name }}" value="{{ value | slugify if value else label | slugify }}"{{ ' checked' if checked }}{{ ' disabled' if disabled }} /><label for="{{ value | slugify if value else label | slugify }}">{{ label }}</label> |
4 changes: 2 additions & 2 deletions
4
src/components/10-atoms/100-form-elements/_checkbox/_checkbox.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<label for="{{ value if value else label | slugify }}"> | ||
<input {% if className %}class="{{ className }}"{% endif %} id="{{ value if value else label | slugify }}" type="checkbox" name="{{ name }}" value="{{ value if value else label | slugify }}"{{ ' checked' if checked }}{{ ' disabled' if disabled }} />{{ label }} | ||
<label for="{{ value | slugify if value else label | slugify }}"> | ||
<input {% if className %}class="{{ className }}"{% endif %} id="{{ value | slugify if value else label | slugify }}" type="checkbox" name="{{ name }}" value="{{ value if value else label | slugify }}"{{ ' checked' if checked }}{{ ' disabled' if disabled }} />{{ label }} | ||
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters