Format code using php-cs-fixer
This commit is contained in:
parent
43d7dc92cd
commit
d52c6184b9
352 changed files with 17473 additions and 17041 deletions
|
@ -1,51 +1,49 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
*/
|
||||
class Application_Form_PasswordChange extends Zend_Form
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/password-change.phtml'))
|
||||
));
|
||||
|
||||
$this->setDecorators([
|
||||
['ViewScript', ['viewScript' => 'form/password-change.phtml']],
|
||||
]);
|
||||
|
||||
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
|
||||
$stringLengthValidator = Application_Form_Helper_ValidationTypes::overrideStringLengthValidator(6, 80);
|
||||
|
||||
$this->addElement('password', 'password', array(
|
||||
$this->addElement('password', 'password', [
|
||||
'label' => _('Password'),
|
||||
'required' => true,
|
||||
'filters' => array('stringTrim'),
|
||||
'validators' => array($notEmptyValidator,
|
||||
$stringLengthValidator),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
'filters' => ['stringTrim'],
|
||||
'validators' => [$notEmptyValidator,
|
||||
$stringLengthValidator, ],
|
||||
'decorators' => [
|
||||
'ViewHelper',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addElement('password', 'password_confirm', array(
|
||||
$this->addElement('password', 'password_confirm', [
|
||||
'label' => _('Confirm new password'),
|
||||
'required' => true,
|
||||
'filters' => array('stringTrim'),
|
||||
'validators' => array(
|
||||
'filters' => ['stringTrim'],
|
||||
'validators' => [
|
||||
new Zend_Validate_Callback(function ($value, $context) {
|
||||
return $value == $context['password'];
|
||||
}),
|
||||
),
|
||||
'errorMessages' => array(_("Password confirmation does not match your password.")),
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
],
|
||||
'errorMessages' => [_('Password confirmation does not match your password.')],
|
||||
'decorators' => [
|
||||
'ViewHelper',
|
||||
],
|
||||
]);
|
||||
|
||||
$this->addElement('submit', 'submit', array(
|
||||
$this->addElement('submit', 'submit', [
|
||||
'label' => _('Save'),
|
||||
'ignore' => true,
|
||||
'class' => 'ui-button ui-widget ui-state-default ui-button-text-only center',
|
||||
'decorators' => array(
|
||||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
'decorators' => [
|
||||
'ViewHelper',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue