Skip to content

Commit 39ecd07

Browse files
committed
Fixing the disabled currency inputs
1 parent 27076ca commit 39ecd07

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

app/code/Magento/CurrencySymbol/view/adminhtml/templates/grid.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
class="required-entry admin__control-text <?= $data['inherited'] ? 'disabled' : '' ?>"
2323
type="text"
2424
value="<?= $block->escapeHtmlAttr($data['displaySymbol']) ?>"
25-
name="custom_currency_symbol[<?= $block->escapeHtmlAttr($code) ?>]">
25+
name="custom_currency_symbol[<?= $block->escapeHtmlAttr($code) ?>]"
26+
<?= $data['inherited'] ? 'disabled' : '' ?>>
2627
<div class="admin__field admin__field-option">
2728
<input id="custom_currency_symbol_inherit<?= $block->escapeHtmlAttr($code) ?>"
2829
class="admin__control-checkbox" type="checkbox"

app/code/Magento/CurrencySymbol/view/adminhtml/web/js/symbols-form.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@ define([
2525
input = $('#custom_currency_symbol' + code);
2626

2727
if (checkbox.is(':checked')) {
28-
input.addClass('disabled');
2928
input.val(value);
30-
input.prop('readonly', true);
29+
input.prop('disabled', true);
3130
} else {
32-
input.removeClass('disabled');
33-
input.prop('readonly', false);
31+
input.prop('disabled', false);
3432
}
3533
}
3634

0 commit comments

Comments
 (0)