예제 #1
0
 public function __construct()
 {
     // we want to ignore the name passed
     parent::__construct('lov');
     $this->setAttribute('method', 'post');
     $this->add(new Element\Hidden('type_lov'));
     $new_type_lov = new Element\Text('new_type_lov');
     $new_type_lov->setLabel('List Type')->setAttributes(array('class' => 'form-control input-sm'));
     $this->add($new_type_lov);
     $nid_language = new Element\Select('nid_language');
     $nid_language->setLabel('Language')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a language'));
     $this->add($nid_language);
     $bool_translateable = new Element\Radio('bool_translateable');
     $bool_translateable->setLabel('Translateable')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_translateable);
     $bool_controlbypoxn = new Element\Radio('bool_controlbypoxn');
     $bool_controlbypoxn->setLabel('Control by Poxn')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'));
     $this->add($bool_controlbypoxn);
     $back = new Element\Button('back');
     $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn btn-primary btn-sm', 'onclick' => ''));
     $this->add($back);
     $submit = new Element\Submit('submit');
     $submit->setValue('Go')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn btn-primary btn-sm'));
     $this->add($submit);
 }
 public function __construct($name = null)
 {
     parent::__construct($name);
     $image = (include __DIR__ . '/Captcha/imageCaptcha.php');
     $captcha = new Captcha('captcha');
     $captcha->setCaptcha($image)->setLabel('Please verify the characters in the image. (do not have numbers)')->setAttributes(array('type' => 'captcha', 'class' => 'input-sm', 'style' => 'display: block; margin: 10px 0 10px 0;'));
     $this->add($captcha);
 }
 public function __construct($name = null)
 {
     parent::__construct($name);
     $this->add(new Element\Hidden('nid'));
     $this->add(new Element\Hidden('id_row'));
 }