##Update:
Update:
##Update:
Update:
##Update:
I was able to get functions to work if i removed the requirejs wrapper and change $ to jQuery in components.js.
function checkFormValues(inputs, radio) {
 var empty = false;
 jQuery(inputs).each(function () {
 if (jQuery(this).val() == '') {
 empty = true;
 return false;
 }
 });
 jQuery.each(radio, function(index, value) {
 if (!jQuery("input[name='" + value + "']:checked").val()) {
 empty = true;
 }
 });
 return empty;
}
function checkEnableSubmit(inputs, radio, button) {
 if (checkFormValues(inputs, radio)) {
 jQuery(button).attr('disabled', 'disabled');
 } else {
 jQuery(button).removeAttr('disabled');
 }
}
Should I not use requirejs wrapper for any shared functions or libraries?
##Update:
I was able to get functions to work if i removed the requirejs wrapper and change $ to jQuery in components.js.
function checkFormValues(inputs, radio) {
 var empty = false;
 jQuery(inputs).each(function () {
 if (jQuery(this).val() == '') {
 empty = true;
 return false;
 }
 });
 jQuery.each(radio, function(index, value) {
 if (!jQuery("input[name='" + value + "']:checked").val()) {
 empty = true;
 }
 });
 return empty;
}
function checkEnableSubmit(inputs, radio, button) {
 if (checkFormValues(inputs, radio)) {
 jQuery(button).attr('disabled', 'disabled');
 } else {
 jQuery(button).removeAttr('disabled');
 }
}
Should I not use requirejs wrapper for any shared functions or libraries?
magento 2: reference js function not working from jstemplate file
Loading
default