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;
|
||||
|
||||
/**
|
||||
* Create this form
|
||||
*
|
||||
* @see Icinga\Web\Form::create
|
||||
* @see Form::createElements()
|
||||
*/
|
||||
public function create()
|
||||
public function createElements(array $formData)
|
||||
{
|
||||
$this->addElement(
|
||||
'text',
|
||||
'protected_customvars',
|
||||
array(
|
||||
'label' => 'Protected Custom Variables',
|
||||
'required' => true,
|
||||
'value' => $this->config->protected_customvars,
|
||||
'helptext' => 'Comma separated case insensitive list of protected custom variables.'
|
||||
. ' Use * as a placeholder for zero or more wildcard characters.'
|
||||
. ' Existance of those custom variables will be shown, but their values will be masked.'
|
||||
return array(
|
||||
$this->createElement(
|
||||
'text',
|
||||
'protected_customvars',
|
||||
array(
|
||||
'label' => 'Protected Custom Variables',
|
||||
'required' => true,
|
||||
'value' => $this->config->protected_customvars,
|
||||
'helptext' => 'Comma separated case insensitive list of protected custom variables.'
|
||||
. ' 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