CC-3667 : Preferences pages should have an option to enable/disable password recovery option
This commit is contained in:
parent
4cdfd33044
commit
439ebb1128
|
@ -84,16 +84,23 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||||
->setFilters(array('StringTrim'))
|
->setFilters(array('StringTrim'))
|
||||||
->setValidators(array(
|
->setValidators(array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
'EmailAddress',
|
'EmailAddress'
|
||||||
new Zend_Validate_Callback(function ($value, $context) {
|
))
|
||||||
if ($context['enableSystemEmail']) {
|
->setDecorators(array('ViewHelper'));
|
||||||
return true;
|
|
||||||
}
|
$systemEmail->addValidator('Callback', true, array(
|
||||||
|
'callback' => function($value, $context) {
|
||||||
return false;
|
if ($context['enableSystemEmail']) {
|
||||||
})
|
return true;
|
||||||
))
|
}
|
||||||
->setDecorators(array('ViewHelper'));
|
return false;
|
||||||
|
},
|
||||||
|
'messages' => array(
|
||||||
|
Zend_Validate_Callback::INVALID_VALUE => 'Email must be enabled'
|
||||||
|
),
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
$this->addElement($systemEmail);
|
$this->addElement($systemEmail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue