Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added label to system.xml #3577

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* OpenMage
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available at https://opensource.org/license/osl-3-0-php
*
* @category Mage
* @package Mage_Adminhtml
* @copyright Copyright (c) 2023 The OpenMage Contributors (https://www.openmage.org)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/

/**
* Adminhtml system config label field renderer
*
* @category Mage
* @package Mage_Adminhtml
*/
class Mage_Adminhtml_Block_System_Config_Form_Field_Label extends Mage_Adminhtml_Block_System_Config_Form_Field
{
public function render(Varien_Data_Form_Element_Abstract $element)
{
$element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue()->unsPath();
return parent::render($element);
}

protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
{
$field = $element->getFieldConfig();
$element->setValue($field->value);
$element->setBold(!empty($field->bold));

return $element->getElementHtml();
}
}
Loading