protected function setup() { parent::setup(); $this->addPassword('current', "Current password")->setRequired(); $this->addEmail('email', "E-mail")->setRequired(); $this->addSubmit('sub', "Save"); $this->onSuccess[] = callback($this, 'process'); }
protected function setup() { parent::setup(); $roles = $this->getDoctrineContainer()->getService('Nella\Security\RoleEntity')->repository->fetchPairs('id', "name"); $this->addText('username', "Username")->setRequired(); $this->addEmail('email', "E-mail")->setRequired(); $this->addPassword('password', "Password"); $this->addPassword('password2', "Re-Password")->addCondition(static::FILLED) ->addRule(static::EQUAL, NULL, $this['password']); $this->addSelect('role', "Role", $roles); $this->addSelect('lang', "Lang", array('en' => "English"))->setRequired(); // @todo $this->addSubmit('sub', "Add"); $this->onSuccess[] = callback($this, 'process'); }