Example #1
0
 public function init()
 {
     parent::init();
     // TODO: Change the autogenerated stub
     $this->add(array('name' => 'cost', 'type' => 'Text', 'options' => array('label' => 'Цена в USD')));
     $this->add(array('name' => 'currency', 'type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'options' => array('object_manager' => $this->getServiceLocator()->getServiceLocator()->get('doctrine-document'), 'target_class' => 'Course\\Document\\Courses', 'label' => 'Валюта')));
     $this->add(array('name' => 'countThread', 'type' => 'Select', 'options' => array('label' => 'Количество потоков', 'value_options' => array('1', '5', '10', '50', '100', '500', '1000'))));
     $this->add(array('name' => 'start', 'type' => 'Button', 'options' => array('label' => 'Старт'), 'attributes' => array('class' => 'btn start')));
 }
Example #2
0
 public function init()
 {
     parent::init();
     $this->setAttribute('method', 'post');
     $this->setHydrator(new ClassMethodsHydrator(false));
     $this->setInputFilter(new InputFilter());
     $this->add(['type' => 'Ajasta\\Client\\Form\\ClientFieldset', 'options' => ['use_as_base_fieldset' => true]]);
     $this->add(['type' => 'button', 'name' => 'submit', 'options' => ['label' => 'Submit', 'column-size' => 'sm-12 form-action'], 'attributes' => ['type' => 'submit', 'class' => 'btn-primary']]);
 }
 public function init()
 {
     parent::init();
     $this->setHydrator(new DoctrineHydrator($this->getObjectManager()))->setInputFilter(new InputFilter());
     $this->add(array('name' => 'semester', 'type' => SemesterFieldset::class, 'options' => array('use_as_base_fieldset' => true)));
     /*$this->add(array(
     			'name' => 'semester_csrf',
     			'type' => Csrf::class,
     		));*/
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Save', 'class' => 'btn-success'), 'options' => array('as-group' => true)));
 }
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->add(array('name' => 'csrf', 'type' => 'csrf', 'required' => true, 'validators' => array(array('name' => 'csrf'))));
 }
Example #5
0
 public function init()
 {
     parent::init();
 }
Example #6
0
 /**
  * {@inheritDoc}
  */
 public function init()
 {
     $this->getEventManager()->trigger(__FUNCTION__, $this);
     parent::init();
     if ($this->getOption('use_captcha')) {
         $this->addCaptchaElement();
     }
     if ($this->getOption('use_csrf')) {
         $this->addCsrfElement();
     }
     if ($this->getOption('use_submit_element')) {
         $this->addSubmitElement();
     }
     if ($this->getOption('use_reset_element')) {
         $this->addResetElement();
     }
 }