mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
SecurityForm: replace create() with createElements() and add addSubmitButton()
refs #5525
This commit is contained in:
parent
11063495b2
commit
b81e96574a
@ -15,25 +15,41 @@ class SecurityForm extends Form
|
|||||||
protected $config;
|
protected $config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create this form
|
* @see Form::createElements()
|
||||||
*
|
|
||||||
* @see Icinga\Web\Form::create
|
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function createElements(array $formData)
|
||||||
{
|
{
|
||||||
$this->addElement(
|
return array(
|
||||||
'text',
|
$this->createElement(
|
||||||
'protected_customvars',
|
'text',
|
||||||
array(
|
'protected_customvars',
|
||||||
'label' => 'Protected Custom Variables',
|
array(
|
||||||
'required' => true,
|
'label' => 'Protected Custom Variables',
|
||||||
'value' => $this->config->protected_customvars,
|
'required' => true,
|
||||||
'helptext' => 'Comma separated case insensitive list of protected custom variables.'
|
'value' => $this->config->protected_customvars,
|
||||||
. ' Use * as a placeholder for zero or more wildcard characters.'
|
'helptext' => 'Comma separated case insensitive list of protected custom variables.'
|
||||||
. ' Existance of those custom variables will be shown, but their values will be masked.'
|
. ' Use * as a placeholder for zero or more wildcard characters.'
|
||||||
|
. ' Existance of those custom variables will be shown, but their values will be masked.'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$this->setSubmitLabel('Save');
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see Form::addSubmitButton()
|
||||||
|
*/
|
||||||
|
public function addSubmitButton()
|
||||||
|
{
|
||||||
|
$this->addElement(
|
||||||
|
'submit',
|
||||||
|
'btn_submit',
|
||||||
|
array(
|
||||||
|
'ignore' => true,
|
||||||
|
'label' => t('Save Changes')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user