Example #1
0
	public function testEditor()
	{
		$item = $this->form->addEditor('editor', "Editor");

		$this->assertInstanceOf('Nette\Forms\Controls\TextArea', $item, 'is Nette\Forms\Controls\TextArea');
		$this->assertTrue((bool) $item->control->{'data-nella-editor'}, "editor data attribute");
	}
Example #2
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 #3
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");
	}