ConfigForm: use fieldset instead of HTML header

This commit is contained in:
Thomas Gelf 2016-03-16 17:20:11 +01:00
parent b94c6bf481
commit 444e22d831

View File

@ -16,7 +16,6 @@ class ConfigForm extends QuickForm
$config = $this->config();
$resources = $this->enumResources();
$this->addHtml(sprintf('<h3>%s</h3>', $this->translate('Database backend')));
$this->addElement('select', 'resource', array(
'required' => true,
'label' => $this->translate('DB Resource'),
@ -25,6 +24,16 @@ class ConfigForm extends QuickForm
'value' => $config->get('db', 'resource')
));
$this->addDisplayGroup(array('resource'), 'config', array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'dl')),
'Fieldset',
),
'order' => 40,
'legend' => $this->translate('Database backend')
));
if (empty($resources)) {
$this->getElement('resource')->addError(
$this->translate('This has to be a MySQL or PostgreSQL database')