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 2929 <input class="bundle-option-<?php echo $ _option ->getId () ?> checkbox product bundle option change-container-classname"
3030 id="bundle-option-<?php echo $ _option ->getId () ?> -<?php echo $ _selection ->getSelectionId () ?> "
3131 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 \' }" '?>
3333 name="bundle_option[<?php echo $ _option ->getId () ?> ][<?php echo $ _selection ->getId () ?> ]"
3434 <?php if ($ block ->isSelected ($ _selection )) echo ' checked="checked" ' ?>
3535 <?php if (!$ _selection ->isSaleable ()) echo ' disabled="disabled" ' ?>
Original file line number Diff line number Diff line change 916916 'This is a required field.'
917917 ] ,
918918 "validate-one-required-by-name" : [
919- function ( v , elm ) {
919+ function ( v , elm , selector ) {
920920 var name = elm . name . replace ( / ( [ \\ " ] ) / g, '\\$1' ) ,
921921 container = this . currentForm ,
922- selector = 'input[name="' + name + '"]:checked' ;
922+ selector = selector === true ? 'input[name="' + name + '"]:checked' : selector ;
923923
924924 return ! ! container . querySelectorAll ( selector ) . length ;
925925 } ,
You can’t perform that action at this time.
0 commit comments