Example #1
0
	protected function setup()
	{
		parent::setup();

		$this->addPassword('current', "Current")->setRequired();
		$this->addPassword('password', "Password")->setRequired();
		$this->addPassword('password2', "Re-Password")->addCondition(static::FILLED)
			->addRule(static::EQUAL, NULL, $this['password']);

		$this->addSubmit('sub', "Save");

		$this->onSuccess[] = callback($this, 'process');
	}
Example #2
0
	protected function setup()
	{
		parent::setup();

		$this->addText('username', "Username")->setRequired();
		$this->addPassword('password', "Password")->setRequired();

		$this->addCheckbox('remember', "Remember me")->setDisabled(); // @todo

		$this->addSubmit('sub', "Login");

		$this->onSuccess[] = callback($this, "process");
	}