File tree Expand file tree Collapse file tree 2 files changed +14
-14
lines changed
Block/System/Config/Form/Field Expand file tree Collapse file tree 2 files changed +14
-14
lines changed Original file line number Diff line number Diff line change 1- <?php
2- namespace Experius \Postcode \Block \System \Config \Form \Field ;
3-
4- use Magento \Framework \Data \Form \Element \AbstractElement ;
5-
6- class ReadOnly extends \Magento \Config \Block \System \Config \Form \Field
7- {
8- protected function _getElementHtml (AbstractElement $ element )
9- {
10- $ element ->setData ('readonly ' , 1 );
11- return $ element ->getElementHtml ();
12- }
13- }
1+ <?php
2+ namespace Experius \Postcode \Block \System \Config \Form \Field ;
3+
4+ use Magento \Framework \Data \Form \Element \AbstractElement ;
5+
6+ class ReadOnlyField extends \Magento \Config \Block \System \Config \Form \Field
7+ {
8+ protected function _getElementHtml (AbstractElement $ element )
9+ {
10+ $ element ->setData ('readonly ' , 1 );
11+ return $ element ->getElementHtml ();
12+ }
13+ }
Original file line number Diff line number Diff line change 2222 </field >
2323 <field id =" api_key_is_valid" showInDefault =" 1" showInStore =" 1" showInWebsite =" 1" sortOrder =" 40" translate =" label" type =" text" >
2424 <label >Api Key is valid</label >
25- <frontend_model >Experius\Postcode\Block\System\Config\Form\Field\ReadOnly </frontend_model >
25+ <frontend_model >Experius\Postcode\Block\System\Config\Form\Field\ReadOnlyField </frontend_model >
2626 </field >
2727 <field id =" api_key_checker" showInDefault =" 1" showInStore =" 1" showInWebsite =" 1" sortOrder =" 41" translate =" label" type =" button" >
2828 <button_label >Check Api Key</button_label >
You can’t perform that action at this time.
0 commit comments