Skip to content

Commit 0842481

Browse files
author
OlgaVasyltsun
committed
MC-17623: Could not save multiselect/select attribute options when Swatches modules disabled
1 parent 8a20a76 commit 0842481

File tree

1 file changed

+10
-4
lines changed
  • app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute

1 file changed

+10
-4
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/js.phtml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ require([
1111
"jquery",
1212
'Magento_Ui/js/modal/alert',
1313
'Magento_Ui/js/modal/prompt',
14+
'uiRegistry',
1415
"collapsable",
1516
"prototype"
16-
], function(jQuery, alert, prompt){
17+
], function(jQuery, alert, prompt, registry){
1718

1819
function toggleApplyVisibility(select) {
1920
if ($(select).value == 1) {
@@ -39,15 +40,20 @@ function getFrontTab() {
3940

4041
function checkOptionsPanelVisibility(){
4142
if($('manage-options-panel')){
42-
var panel = $('manage-options-panel').up('.fieldset'),
43+
var panelId = 'manage-options-panel',
44+
panel = $(panelId),
45+
panelFieldSet = panel.up('.fieldset'),
4346
activePanelClass = 'selected-type-options';
4447

4548
if($('frontend_input') && ($('frontend_input').value=='select' || $('frontend_input').value=='multiselect')){
46-
panel.show();
49+
panelFieldSet.show();
4750
jQuery(panel).addClass(activePanelClass);
51+
registry.get(panelId, function () {
52+
jQuery('#' + panelId).trigger('render');
53+
});
4854
}
4955
else {
50-
panel.hide();
56+
panelFieldSet.hide();
5157
jQuery(panel).removeClass(activePanelClass);
5258
}
5359
}

0 commit comments

Comments
 (0)