File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed
Test/Unit/Block/System/Config/Form Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ protected function _renderInheritCheckbox(\Magento\Framework\Data\Form\Element\A
98
98
$ htmlId = $ element ->getHtmlId ();
99
99
$ namePrefix = preg_replace ('#\[value\](\[\])?$# ' , '' , $ element ->getName ());
100
100
$ checkedHtml = $ element ->getInherit () == 1 ? 'checked="checked" ' : '' ;
101
- $ disabled = $ element ->getIsDisableInheritance () == true ? ' disabled="disabled" ' : '' ;
101
+ $ disabled = $ element ->getIsDisableInheritance () == true ? ' disabled="disabled" readonly="1" ' : '' ;
102
102
103
103
$ html = '<td class="use-default"> ' ;
104
104
$ html .= '<input id=" ' .
Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public function testRenderInheritCheckbox()
187
187
'_inherit" name=" ' .
188
188
$ this ->_testData ['name ' ] .
189
189
'[inherit]" type="checkbox" value="1" ' .
190
- ' class="checkbox config-inherit" checked="checked" ' . ' disabled="disabled" ' .
190
+ ' class="checkbox config-inherit" checked="checked" ' . ' disabled="disabled" ' . ' readonly="1" ' .
191
191
' onclick="toggleValueElements(this, Element.previous(this.parentNode))" /> ' ;
192
192
193
193
$ expected .= '<label for=" ' . $ this ->_testData ['htmlId ' ] . '_inherit" class="inherit">Use Website</label> ' ;
Original file line number Diff line number Diff line change @@ -494,7 +494,8 @@ define([
494
494
inputs . each ( function ( item ) {
495
495
// don't touch hidden inputs (and Use Default inputs too), bc they may have custom logic
496
496
if ( ( ! item . type || item . type != 'hidden' ) && ! ( $ ( item . id + '_inherit' ) && $ ( item . id + '_inherit' ) . checked ) && //eslint-disable-line
497
- ! ( currentConfig [ 'can_edit_price' ] != undefined && ! currentConfig [ 'can_edit_price' ] ) //eslint-disable-line
497
+ ! ( currentConfig [ 'can_edit_price' ] != undefined && ! currentConfig [ 'can_edit_price' ] ) && //eslint-disable-line
498
+ ! item . getAttribute ( 'readonly' ) //eslint-disable-line
498
499
) {
499
500
item . disabled = false ;
500
501
jQuery ( item ) . removeClass ( 'ignore-validate' ) ;
You can’t perform that action at this time.
0 commit comments