File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Catalog/view/adminhtml/templates/catalog/product/attribute
Swatches/view/adminhtml/web/js Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -196,9 +196,11 @@ function switchDefaultValueField()
196196
197197 <?php foreach ($ this ->helper ('Magento\Catalog\Helper\Data ' )->getAttributeHiddenFields () as $ type => $ fields ): ?>
198198 case '<?= /* @escapeNotVerified */ $ type ?> ':
199+ var isFrontTabHidden = false;
199200 <?php foreach ($ fields as $ one ): ?>
200201 <?php if ($ one == '_front_fieldset ' ): ?>
201202 getFrontTab().hide();
203+ isFrontTabHidden = true;
202204 <?php elseif ($ one == '_default_value ' ): ?>
203205 defaultValueTextVisibility =
204206 defaultValueTextareaVisibility =
@@ -210,6 +212,10 @@ function switchDefaultValueField()
210212 setRowVisibility('<?= /* @escapeNotVerified */ $ one ?> ', false);
211213 <?php endif ; ?>
212214 <?php endforeach ; ?>
215+
216+ if (!isFrontTabHidden){
217+ getFrontTab().show();
218+ }
213219 break;
214220 <?php endforeach ; ?>
215221
Original file line number Diff line number Diff line change @@ -182,6 +182,7 @@ define([
182182 useProductImageForSwatch = false ,
183183 defaultValueUpdateImage = false ,
184184 optionDefaultInputType = '' ,
185+ isFrontTabHidden = false ,
185186 thing = this ;
186187
187188 if ( ! this . frontendInput . length ) {
@@ -246,6 +247,7 @@ define([
246247 switch ( option ) {
247248 case '_front_fieldset' :
248249 thing . tabsFront . hide ( ) ;
250+ isFrontTabHidden = true ;
249251 break ;
250252
251253 case '_default_value' :
@@ -262,6 +264,11 @@ define([
262264 thing . setRowVisibility ( $ ( '#' + option ) , false ) ;
263265 }
264266 } ) ;
267+
268+ if ( ! isFrontTabHidden ) {
269+ thing . tabsFront . show ( ) ;
270+ }
271+
265272 } else {
266273 this . tabsFront . show ( ) ;
267274 this . showDefaultRows ( ) ;
You can’t perform that action at this time.
0 commit comments