protected function createComponentRegisterAdministratorForm(): Form
	{
		$form = $this->formFactory->create();
		$form->addProtection();

		$form->addText('username', 'cms.user.username')
			->setRequired();
		$form->addText('firstName', 'cms.user.firstName');
		$form->addText('surname', 'cms.user.surname');
		$form->addText('email', 'cms.user.email')
			->setRequired()
			->addRule(Form::EMAIL);

		$form->addPassword('password', 'cms.user.newPassword')
			->setRequired()
			->addRule(Form::MIN_LENGTH, null, $this->minPasswordLength);
		$form->addPassword('passwordVerify', 'cms.user.passwordVerify')
			->setRequired()
			->addRule(Form::EQUAL, null, $form['password']);

		$form->addSubmit('create', 'form.save');

		$form->onSuccess[] = [$this, 'registerAdministratorFormSucceeded'];

		return $form;
	}
protected function createComponentRegisterAdministratorForm(): Form
	{
		$form = $this->formFactory->create();
		$form->addProtection();

		$form->addText('username', 'cms.user.username')
			->setRequired();
		$form->addText('firstName', 'cms.user.firstName');
		$form->addText('surname', 'cms.user.surname');
		$form->addText('email', 'cms.user.email')
			->setRequired()
			->addRule(Form::EMAIL);

		$form->addPassword('password', 'cms.user.newPassword')
			->setRequired()
			->addRule(Form::MIN_LENGTH, null, $this->minPasswordLength);
		$form->addPassword('passwordVerify', 'cms.user.passwordVerify')
			->setRequired()
			->addRule(Form::EQUAL, null, $form['password']);

		$form->addSubmit('create', 'form.save');

		$form->onSuccess[] = [$this, 'registerAdministratorFormSucceeded'];

		return $form;
	}
protected function createComponentRegisterAdministratorForm ( ) : Form { $ form = $ this -> formFactory -> create ( ) ; $ form -> addProtection ( ) ; $ form -> addText ( 'username' , 'cms.user.username' ) -> setRequired ( ) ; $ form -> addText ( 'firstName' , 'cms.user.firstName' ) ; $ form -> addText ( 'surname' , 'cms.user.surname' ) ; $ form -> addText ( 'email' , 'cms.user.email' ) -> setRequired ( ) -> addRule ( Form :: EMAIL ) ; $ form -> addPassword ( 'password' , 'cms.user.newPassword' ) -> setRequired ( ) -> addRule ( Form :: MIN_LENGTH , null , $ this -> minPasswordLength ) ; $ form -> addPassword ( 'passwordVerify' , 'cms.user.passwordVerify' ) -> setRequired ( ) -> addRule ( Form :: EQUAL , null , $ form [ 'password' ] ) ; $ form -> addSubmit ( 'create' , 'form.save' ) ; $ form -> onSuccess [ ] = [ $ this , 'registerAdministratorFormSucceeded' ] ; return $ form ; }
Formular pro prvniho uzivatele
@return Form
Formular pro prvniho uzivatele