File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
app/code/Magento/Config/view/adminhtml/templates/system/config Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -256,15 +256,21 @@ require([
256
256
});
257
257
258
258
window.configForm.on('invalid-form.validate', function (event, validation) {
259
- var firstActive = jQuery(validation.errorList[0].element || []);
260
-
261
- if (firstActive.length) {
262
- jQuery(firstActive.parents('.section-config')).each(function () {
263
- if (!jQuery(this).hasClass('active')) {
264
- Fieldset.toggleCollapse(jQuery(this).children('.config.admin__collapsible-block').attr('id'));
265
- }
266
- })
259
+ if (validation.errorList.length === 0) {
260
+ return;
267
261
}
262
+
263
+ jQuery.each(validation.errorList, function () {
264
+ var element = jQuery(this.element || []);
265
+
266
+ if (element.length) {
267
+ jQuery(element.parents('.section-config')).each(function () {
268
+ if (!jQuery(this).hasClass('active')) {
269
+ Fieldset.toggleCollapse(jQuery(this).children('.config.admin__collapsible-block').attr('id'));
270
+ }
271
+ });
272
+ }
273
+ });
268
274
})
269
275
270
276
$$('.shared').each(function(element){
You can’t perform that action at this time.
0 commit comments