File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
app/code/Magento/Bundle/view/frontend/templates/catalog/product/view/type/bundle/option Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 29
29
<input class="bundle-option-<?php echo $ _option ->getId () ?> checkbox product bundle option change-container-classname"
30
30
id="bundle-option-<?php echo $ _option ->getId () ?> -<?php echo $ _selection ->getSelectionId () ?> "
31
31
type="checkbox"
32
- <?php if ($ _option ->getRequired ()) echo 'data-validate="{ \'validate-one-required-by-name \':true }" ' ?>
32
+ <?php if ($ _option ->getRequired ()) echo 'data-validate="{ \'validate-one-required-by-name \': \' input[name^="bundle_option[ ' . $ _option -> getId () . ' ]"]:checked \' }" '?>
33
33
name="bundle_option[<?php echo $ _option ->getId () ?> ][<?php echo $ _selection ->getId () ?> ]"
34
34
<?php if ($ block ->isSelected ($ _selection )) echo ' checked="checked" ' ?>
35
35
<?php if (!$ _selection ->isSaleable ()) echo ' disabled="disabled" ' ?>
Original file line number Diff line number Diff line change 916
916
'This is a required field.'
917
917
] ,
918
918
"validate-one-required-by-name" : [
919
- function ( v , elm ) {
919
+ function ( v , elm , selector ) {
920
920
var name = elm . name . replace ( / ( [ \\ " ] ) / g, '\\$1' ) ,
921
921
container = this . currentForm ,
922
- selector = 'input[name="' + name + '"]:checked' ;
922
+ selector = selector === true ? 'input[name="' + name + '"]:checked' : selector ;
923
923
924
924
return ! ! container . querySelectorAll ( selector ) . length ;
925
925
} ,
You can’t perform that action at this time.
0 commit comments