SecurityConfigForm: if protected_customvars is not set at all, display suggestion as placeholder
refs #2767
This commit is contained in:
parent
b0221c5e13
commit
9a79b194dd
|
@ -52,7 +52,7 @@ class SecurityConfigForm extends ConfigForm
|
|||
'protected_customvars',
|
||||
array(
|
||||
'allowEmpty' => true,
|
||||
'value' => '*pw*,*pass*,community',
|
||||
'attribs' => array('placeholder' => $this->getDefaultProtectedCustomvars()),
|
||||
'label' => $this->translate('Protected Custom Variables'),
|
||||
'description' => $this->translate(
|
||||
'Comma separated case insensitive list of protected custom variables.'
|
||||
|
@ -62,4 +62,14 @@ class SecurityConfigForm extends ConfigForm
|
|||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the customvars to suggest to protect when none are protected
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getDefaultProtectedCustomvars()
|
||||
{
|
||||
return '*pw*,*pass*,community';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,5 +22,6 @@ class SecurityPage extends Form
|
|||
$securityConfigForm = new SecurityConfigForm();
|
||||
$securityConfigForm->createElements($formData);
|
||||
$this->addElements($securityConfigForm->getElements());
|
||||
$this->getElement('protected_customvars')->setValue($securityConfigForm->getDefaultProtectedCustomvars());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue