public function testAddCaptcha()
 {
     $form = new BaseUser();
     $form->getFormFactory()->setFormElementManager($this->serviceManager->get('FormElementManager'));
     $form->addCaptcha();
     $this->assertTrue($form->has('captcha'));
 }
 public function init()
 {
     parent::init();
     $this->remove('userId')->remove('firstname')->remove('lastname')->remove('show-password')->remove('passwd')->remove('passwd-confirm')->remove('role')->remove('dateCreated')->remove('dateModified')->remove('active');
     $this->addCaptcha();
     $this->add(['name' => 'submit', 'type' => 'submit', 'options' => ['label' => 'Reset Password', 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL, 'column-size' => 'sm-10 col-sm-offset-2']]);
 }
Example #3
0
 public function init()
 {
     parent::init();
     $this->remove('userId')->remove('firstname')->remove('lastname')->remove('passwd-confirm')->remove('role')->remove('dateCreated')->remove('dateModified')->remove('active');
     $this->add(['name' => 'rememberme', 'type' => 'checkbox', 'options' => ['label' => 'Remember Me', 'use_hidden_element' => true, 'checked_value' => 1, 'unchecked_value' => 0, 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL, 'column-size' => 'sm-10 col-sm-offset-2']]);
     $this->add(['name' => 'submit', 'type' => 'submit', 'options' => ['label' => 'Login', 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL, 'column-size' => 'sm-10 col-sm-offset-2']]);
 }
Example #4
0
 public function init()
 {
     parent::init();
     $this->remove('userId')->remove('role')->remove('dateCreated')->remove('dateModified')->remove('active');
     $this->add(['name' => 'submit', 'type' => 'submit', 'options' => ['label' => 'Register', 'twb-layout' => TwbBundleForm::LAYOUT_HORIZONTAL, 'column-size' => 'sm-10 col-sm-offset-2']], ['priority' => -1000]);
 }