예제 #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");
	}
예제 #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');
	}
예제 #3
0
파일: Login.php 프로젝트: norbe/framework
	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");
	}