From b1e2ba78d0478f72a39b985042d537d9de2801d9 Mon Sep 17 00:00:00 2001 From: Jean-Michel Batty Date: Thu, 5 Sep 2024 13:42:56 -0500 Subject: [PATCH] fixed read only field in system settings --- Block/System/Config/Field/Readonlyfield.php | 15 +++++++++++++++ etc/adminhtml/system.xml | 7 ++++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 Block/System/Config/Field/Readonlyfield.php diff --git a/Block/System/Config/Field/Readonlyfield.php b/Block/System/Config/Field/Readonlyfield.php new file mode 100644 index 00000000..62e64846 --- /dev/null +++ b/Block/System/Config/Field/Readonlyfield.php @@ -0,0 +1,15 @@ +setData('readonly', 'readonly'); + return $element->getElementHtml(); + } +} diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index d4807160..f34bc49a 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -216,8 +216,8 @@ 1 - - 1 + + Extend\Warranty\Block\System\Config\Field\Readonlyfield 0 - + + Extend\Warranty\Block\System\Config\Field\Readonlyfield