Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(storefront): BCTHEME-356 Required checkbox message blocks the checkbox #1963

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
- Updated Cornerstone theme and respected variants to meet the verticals/industries documented in BCTHEME-387
- Fixed selecting certain option types which pushes window view to the bottom of the page. [#1959](https://github.com/bigcommerce/cornerstone/pull/1959)
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>