From 2ccb374aaf4a646594eb01e72fee7748871fadcc Mon Sep 17 00:00:00 2001 From: Sergii Shkiria Date: Fri, 15 Dec 2017 16:33:05 +0200 Subject: [PATCH 1/2] magento/magento2#12294: Bug: Adding Custom Attribute - The value of Admin scope can't be empty- Made hidden fields disabled. --- app/code/Magento/Catalog/view/adminhtml/web/js/options.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Catalog/view/adminhtml/web/js/options.js b/app/code/Magento/Catalog/view/adminhtml/web/js/options.js index 5239eb207efca..89ca97ae53c84 100644 --- a/app/code/Magento/Catalog/view/adminhtml/web/js/options.js +++ b/app/code/Magento/Catalog/view/adminhtml/web/js/options.js @@ -81,6 +81,9 @@ define([ element.addClassName('no-display'); element.addClassName('template'); element.hide(); + jQuery(element).find('input').each(function(index, el) { + el.disabled = 'disabled'; + }); this.totalItems--; this.updateItemsCountField(); } From e78ea61cc080a38bb7985f04b5bf33ab0547cf73 Mon Sep 17 00:00:00 2001 From: Oleksandr Miroshnichenko Date: Tue, 2 Jan 2018 14:47:09 +0200 Subject: [PATCH 2/2] magento/magento2#12294: Bug: Adding Custom Attribute - The value of Admin scope can't be empty --- .../templates/catalog/product/attribute/options.phtml | 2 +- .../Magento/Catalog/view/adminhtml/web/js/options.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml index 6ff0e193a774f..f812a27f87ad9 100644 --- a/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml +++ b/app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml @@ -57,7 +57,7 @@ $stores = $block->getStoresSortedBySortOrder();