Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-variable
view
adminhtml
templates
system
variable
js.phtml
Go to the documentation of this file.
1
<?php
6
?>
7
<script>
8
require([
9
'prototype'
10
],
function
() {
11
12
window.toggleValueElement =
function
(element) {
13
var disabled =
false
;
14
if
(element.value == 1) {
15
// use default value
16
disabled =
true
;
17
}
18
$(
'plain_value'
).disabled = disabled;
19
$(
'html_value'
).disabled = disabled;
20
if
(disabled) {
21
$(
'plain_value'
).addClassName(
'disabled'
);
22
$(
'html_value'
).addClassName(
'disabled'
);
23
}
else
{
24
$(
'plain_value'
).removeClassName(
'disabled'
);
25
$(
'html_value'
).removeClassName(
'disabled'
);
26
}
27
}
28
29
});
30
</script>