Skip to content

Commit e2370ac

Browse files
committed
MAGETWO-94819: Swatch validation breaks the whole attribute form
- add jquery form validation event to restore options container
1 parent c8f3f17 commit e2370ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Catalog/view/adminhtml/web/js/options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ define([
210210
}
211211
tableBody = optionContainer.detach();
212212
});
213-
editForm.on('afterValidate.error', function () {
213+
editForm.on('afterValidate.error highlight.validate', function () {
214214
if (optionPanel.hasClass(activePanelClass)) {
215215
optionPanel.find('table').append(tableBody);
216216
jQuery('input[name="serialized_options"]').remove();

app/code/Magento/Swatches/view/adminhtml/web/js/product-attributes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ define([
463463
tableBody = optionContainer.detach();
464464
});
465465

466-
editForm.on('afterValidate.error', function () {
466+
editForm.on('afterValidate.error highlight.validate', function () {
467467
if (activePanel.hasClass(activePanelClass)) {
468468
activePanel.find('table').append(tableBody);
469469
$('input[name="serialized_options"]').remove();

0 commit comments

Comments
 (0)