Skip to content

Commit

Permalink
fix(storefront): BCTHEME-356 Required checkbox message blocks the che…
Browse files Browse the repository at this point in the history
…ckbox (bigcommerce#1963)
  • Loading branch information
BC-tymurbiedukhin authored and sacr3dc0w committed Mar 31, 2021
1 parent 4bb6e28 commit 63e67f5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 21 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Changelog

- Fixed required checkbox message displaying. [1963](https://github.com/bigcommerce/cornerstone/pull/1963)

## Draft
- If multiple Pick List Options are applied, customers cannot select "none" on both. [#1975](https://github.com/bigcommerce/cornerstone/pull/1975)
- Moved phrase from compare.html to en.json for increasing localization. [#1972](https://github.com/bigcommerce/cornerstone/pull/1972)
Expand Down
20 changes: 11 additions & 9 deletions templates/components/amp/products/options/input-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
<small>{{lang 'common.required'}}</small>
{{/if}}
</label>
<input
class="form-checkbox"
type="checkbox"
name="attribute[{{id}}]"
id="attribute-{{id}}"
value="{{value}}"
{{#if checked}}checked{{/if}}
{{#if required}}required{{/if}}>
<label class="form-label {{class}}" for="attribute-{{id}}">{{label}}</label>
<div class="form-option-wrapper">
<input
class="form-checkbox"
type="checkbox"
name="attribute[{{id}}]"
id="attribute-{{id}}"
value="{{value}}"
{{#if checked}}checked{{/if}}
{{#if required}}required{{/if}}>
<label class="form-label {{class}}" for="attribute-{{id}}">{{label}}</label>
</div>
</div>
26 changes: 14 additions & 12 deletions templates/components/products/options/input-checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
{{> components/common/requireness-msg}}
</label>
<input type="hidden" name="attribute[{{id}}]" value="{{noValue}}" />
<input
class="form-checkbox"
type="checkbox"
name="attribute[{{id}}]"
id="attribute-check-{{id}}"
value="{{value}}"
{{#if checked}}
checked
data-default
{{/if}}
{{#if required}}required{{/if}}>
<div class="form-option-wrapper">
<input
class="form-checkbox"
type="checkbox"
name="attribute[{{id}}]"
id="attribute-check-{{id}}"
value="{{value}}"
{{#if checked}}
checked
data-default
{{/if}}
{{#if required}}required{{/if}}>

<label class="form-label {{class}}" for="attribute-check-{{id}}">{{label}}</label>
<label class="form-label {{class}}" for="attribute-check-{{id}}">{{label}}</label>
</div>
</div>

0 comments on commit 63e67f5

Please sign in to comment.