예제 #1
0
 public function __construct($name = null)
 {
     parent::__construct('reginfo');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $email_text = new Element\Text('login');
     $email_text->setLabel('E-mail');
     $email_text->setLabelAttributes(array('class' => 'type_text'));
     $email_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'disabled' => 'disable'));
     $type_text = new Element\Text('type');
     $type_text->setLabel('Type');
     $type_text->setLabelAttributes(array('class' => 'type_text'));
     $type_text->setAttributes(array('class' => 'type_text_input', 'disabled' => 'disable'));
     $password_text = new Element\Password('password');
     $password_text->setLabel('New password');
     $password_text->setLabelAttributes(array('class' => 'type_text'));
     $password_text->setAttributes(array('id' => 'password', 'class' => 'type_text_input'));
     $cpassword_text = new Element\Password('cpassword');
     $cpassword_text->setLabel('Confirm password');
     $cpassword_text->setLabelAttributes(array('class' => 'type_text'));
     $cpassword_text->setAttributes(array('id' => 'cpassword', 'class' => 'type_text_input'));
     $this->add($id_hidden);
     $this->add($email_text);
     $this->add($type_text);
     $this->add($password_text);
     $this->add($cpassword_text);
 }
예제 #2
0
 public function __construct($name = null, $options = array())
 {
     //Formulario
     //Contruimos el formulario en base al padre
     parent::__construct('login', $options);
     //seteamos el actiond el formulario
     $this->setAttributes(array('action' => '/application/index/login'));
     //Elementos
     //Creamos un elemento de tipo texto y seteamos su atributo name
     $e = new Element\Text('name');
     //Seteamos los atributos del elemento
     $e->setAttributes(array('id' => 'txt_name', 'class' => 'txt_name_clase'));
     //seteamos las opciones del elemento
     $e->setOptions(array('label' => 'Usuario: '));
     //añadimos al formulario
     $this->add($e);
     //Definimos los parametros del elemento a generar
     $e = array('type' => 'password', 'name' => 'password', 'attributes' => array('id' => `txt_password`, 'class' => 'txt_password_clase'), 'options' => array('label' => 'Clave: '));
     //agregamo el elemento
     $this->add($e);
     //Agregando un boton
     $e = new Element\Submit('enviar');
     $e->setAttributes(array('id' => `btn_login`, 'value' => 'Enviar', 'class' => 'btn_login'));
     $this->add($e);
 }
예제 #3
0
 /**
  *
  * @param null|string $name
  */
 public function __construct($serviceLocator)
 {
     parent::__construct('transactionFilter');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'GET');
     $filter = $this->getInputFilter();
     $id = new Text('id');
     $id->setAttributes(['placeholder' => 'ID']);
     $this->add($id);
     $filter->add(array('name' => 'id', 'required' => false, 'filters' => array(array('name' => 'StringTrim'), array('name' => 'Digits'))));
     $companyId = $this->addElementCompany('companyId', null, ['required' => false]);
     $transaction = new \Accounting\Model\Transaction();
     $status = new Select('status');
     $status->setValueOptions(['' => '- Trạng thái -'] + $transaction->getStatuses());
     $this->add($status);
     $filter->add(array('name' => 'status', 'required' => false, 'filters' => array(array('name' => 'StringTrim'), array('name' => 'Digits'))));
     $type = new Select('type');
     $type->setValueOptions(['' => '- Loại phiếu -'] + $transaction->getTypes());
     $this->add($type);
     $filter->add(array('name' => 'type', 'required' => false, 'filters' => array(array('name' => 'StringTrim'), array('name' => 'Digits'))));
     $applyDateRange = new Text('applyDateRange');
     $applyDateRange->setAttributes(array('placeholder' => 'Ngày hạch toán', 'class' => 'date-range-picker'));
     $this->add($applyDateRange);
     $filter->add(array('name' => 'applyDateRange', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $createdByName = new Text('createdByName');
     $createdByName->setAttributes(array('placeholder' => 'Người tạo'));
     $this->add($createdByName);
     $filter->add(array('name' => 'createdByName', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $createdById = new Hidden('createdById');
     $this->add($createdById);
     $filter->add(array('name' => 'createdById', 'required' => false, 'filters' => array(array('name' => 'StringTrim'), array('name' => 'Digits'))));
     $this->add(array('name' => 'submit', 'options' => array(), 'attributes' => array('type' => 'submit', 'value' => 'Lọc', 'id' => 'btnFilterCompanyContact', 'class' => 'btn btn-primary')));
 }
예제 #4
0
 public function __construct(EntityManager $objectManager)
 {
     parent::__construct('ligue');
     $this->setAttributes(array('method' => 'post', 'id' => 'auth', 'role' => 'form'));
     $this->setInputFilter(new LigueFilter($objectManager));
     $this->setHydrator(new DoctrineObject($objectManager));
     // Id
     $id = new Hidden('id');
     $this->add($id);
     // Nom
     $nom = new Text('nom');
     $nom->setLabel('Nom')->setLabelAttributes(array('class', 'control-label'));
     $nom->setAttributes(array('id' => 'nom', 'class' => 'form-control', 'placeholder' => 'Nom', 'required' => true));
     $this->add($nom);
     // Image
     $image = new File('image');
     $image->setLabel('Image')->setLabelAttributes(array('class', 'control-label'));
     $image->setAttributes(array('id' => 'image', 'class' => 'form-control', 'placeholder' => 'Image'));
     $this->add($image);
     // Date début
     $dateDebut = new Text('dateDebut');
     $dateDebut->setLabel('Début de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateDebut->setAttributes(array('id' => 'dateDebut', 'class' => 'form-control'));
     //$this->add($dateDebut);
     // Date fin
     $dateFin = new Text('dateFin');
     $dateFin->setLabel('Fin de la ligue')->setLabelAttributes(array('class', 'control-label'));
     $dateFin->setAttributes(array('id' => 'dateFin', 'class' => 'form-control'));
     //$this->add($dateFin);
     // Submit
     $submit = new Submit('submit');
     $submit->setValue('Enregistrer');
     $submit->setAttributes(array('class' => 'btn btn-primary'));
     $this->add($submit);
 }
예제 #5
0
 /**
  * @param null|string $name
  */
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('passwordForgot');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $filter = $this->getInputFilter();
     $groupBasic = new DisplayGroup('groupBasic');
     $this->add($groupBasic);
     $email = new Text('email');
     $email->setLabel('Email:');
     $email->setAttributes(['maxlength' => 255, 'autocomplete' => 'off']);
     $email->setOptions(['descriptions' => ['Nhập email khi bạn đăng ký tài khoản']]);
     $this->add($email);
     $groupBasic->addElement($email);
     $filter->add(array('name' => 'email', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập email'))), array('name' => 'StringLength', 'break_chain_on_failure' => true, 'options' => array('max' => 50, 'min' => 4, 'messages' => array(StringLength::TOO_LONG => 'Tên đăng nhập giới hạn 4-50 kí tự', StringLength::TOO_SHORT => 'Tên đăng nhập giới hạn 4-50 kí tự'))), array('name' => 'EmailAddress', 'break_chain_on_failure' => true, 'options' => array('messages' => array('emailAddressInvalidFormat' => 'Địa chỉ email không hợp lệ'))))));
     $config = $this->getServiceLocator()->get('Config');
     $this->captcha = new ReCaptcha(array('pubkey' => $config['captcha']['reCAPTCHA']['publicKey'], 'privkey' => $config['captcha']['reCAPTCHA']['privateKey'], 'ssl' => !isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ? false : true));
     $this->captcha->setPrivkey($config['captcha']['reCAPTCHA']['privateKey']);
     $this->captcha->setPubkey($config['captcha']['reCAPTCHA']['publicKey']);
     $captcha = new Captcha('captcha');
     $captcha->setLabel('Mã bảo mật:');
     $captcha->setCaptcha($this->captcha);
     $this->add($captcha);
     $groupBasic->addElement($captcha);
     $filter->add(array('name' => 'captcha', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập email'))), $this->captcha)));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Khôi phục mật khẩu', 'id' => 'btnSubmit', 'class' => 'htmlBtn first btn btn-primary'), 'options' => array('clearBefore' => true, 'decorator' => array('type' => 'li', 'attributes' => array('class' => 'btns')))));
 }
예제 #6
0
 public function getLogin()
 {
     $element = new Text('login');
     $element->setLabel('Login');
     $element->setAttributes(array('id' => 'login', 'class' => 'form-control', 'placeholder' => 'Digite o seu login'));
     return $element;
 }
예제 #7
0
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('AccountIndex');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $filter = $this->getInputFilter();
     $group = new DisplayGroup('Subject');
     $group->setLabel('Thêm danh mục môn học');
     $this->add($group);
     // name
     $name = new Text('name');
     $name->setLabel('Tên danh mục:');
     $name->setAttributes(['maxlength' => 255]);
     $this->add($name);
     $group->addElement($name);
     $filter->add(array('name' => 'name', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập tên danh mục'))))));
     // code
     $description = new Textarea('description');
     $description->setLabel('Mô tả danh mục:');
     $description->setAttributes(['maxlength' => 255, 'class' => 'form-control basicEditor ', 'style' => 'min-height: 300px;']);
     $this->add($description);
     $group->addElement($description);
     $filter->add(array('name' => 'description', 'required' => false, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập mô tả danh mục'))))));
     $this->add(array('name' => 'afterSubmit', 'type' => 'radio', 'attributes' => array('value' => '/admin/subject/addcategory'), 'options' => array('layout' => 'fluid', 'clearBefore' => true, 'label' => 'Sau khi lưu dữ liệu:', 'value_options' => array('/admin/subject/addcategory' => 'Tiếp tục nhập', '/admin/subject/category' => 'Hiện danh sách vừa nhập'))));
     $this->add(array('name' => 'submit', 'options' => array('clearBefore' => true), 'attributes' => array('type' => 'submit', 'value' => 'Lưu', 'id' => 'btnSave', 'class' => 'btn btn-primary')));
 }
예제 #8
0
 /**
  * @author KienNN
  * @param unknown $serviceLocator
  * @param string $options
  */
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct();
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'GET');
     $filter = $this->getInputFilter();
     $filter = $this->getInputFilter();
     $daterangepicker = new Text('daterangepicker');
     $daterangepicker->setAttributes(['class' => 'date-range-picker']);
     $this->add($daterangepicker);
     $filter->add(array('name' => 'daterangepicker', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     if ($options && isset($options['displayMode']) && $options['displayMode']) {
         $displayMode = new Select('displayMode');
         if (is_array($options['displayMode'])) {
             $displayMode->setValueOptions($options['displayMode']);
         } else {
             $displayMode->setValueOptions(array('day' => 'Theo ngày', 'month' => 'Theo tháng'));
         }
         $this->add($displayMode);
         $filter->add(array('name' => 'displayMode', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     }
     $companyId = $this->addElementCompany('companyId', null, ['required' => false]);
     $departmentId = new Select('departmentId');
     $departmentId->setValueOptions(['' => '- Phòng ban -']);
     $this->add($departmentId);
     $this->loadDepartments($departmentId, $companyId);
     $filter->add(array('name' => 'departmentId', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
 }
예제 #9
0
 public function __construct()
 {
     parent::__construct();
     $this->setAttribute('method', 'POST');
     $Controller = new Text('Controller');
     $Controller->setLabel("Controller: ");
     $Controller->setAttributes(array("class" => 'form-control'));
     $this->add($Controller);
     $nome = new Text('nome');
     $nome->setLabel("Nome: ");
     $nome->setAttributes(array("class" => 'form-control'));
     $this->add($nome);
     $label = new Text('label');
     $label->setLabel("Label: ");
     $label->setAttributes(array("class" => 'form-control'));
     $this->add($label);
     $route = new Text('route');
     $route->setLabel("Route: ");
     $route->setAttributes(array("class" => 'form-control'));
     $this->add($route);
     $select = new \Zend\Form\Element\Select('parentView');
     $select->setLabel('Parente View');
     $select->setAttributes(array("class" => 'form-control'));
     $select->setValueOptions(array('0' => 'French', '1' => 'English', '2' => 'Japanese', '3' => 'Chinese'));
     $this->add($select);
     $status = new \Zend\Form\Element\Select('Status');
     $status->setLabel('Status');
     $status->setAttributes(array("class" => 'form-control'));
     $status->setValueOptions(array('0' => '', '1' => 'Ativo', '2' => 'Inativo'));
     $this->add($status);
     $submit = new \Zend\Form\Element\Submit('Salvar');
     $submit->setValue('Salvar')->setAttributes(array("class" => 'btn btn-primary btn-lg btn-block'));
     $this->add($submit);
 }
예제 #10
0
 public function getNome()
 {
     $element = new Text('nome');
     $element->setLabel('Nome');
     $element->setAttributes(array('id' => 'nome', 'class' => 'form-control', 'placeholder' => 'Digite o nome do grupo de usuários', 'autofocus' => 'true'));
     return $element;
 }
예제 #11
0
 public function __construct($name = null)
 {
     parent::__construct('register');
     // Creating Fields
     $first_name = new Text('first_name');
     $first_name->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Nome', 'tabindex' => '1'));
     $last_name = new Text('last_name');
     $last_name->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Sobrenome', 'tabindex' => '2'));
     $email = new Text('email');
     $email->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Email', 'tabindex' => '3'));
     $password = new Password('password');
     $password->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Senha', 'tabindex' => '4'));
     $password_confirmation = new Password('password_confirmation');
     $password_confirmation->setAttributes(array('class' => 'form-control input-lg', 'placeholder' => 'Senha', 'tabindex' => '5'));
     $submit = new Element('submit');
     $submit->setAttributes(array('class' => 'btn btn-success btn-block btn-lg', 'type' => 'submit', 'tabindex' => '7'))->setValue('Cadastrar');
     // End Creating Fields
     // Setting Fields
     $this->add($first_name);
     $this->add($last_name);
     $this->add($email);
     $this->add($password);
     $this->add($password_confirmation);
     $this->add($submit, array('priority' => -100));
 }
예제 #12
0
파일: Signin.php 프로젝트: projectHN/mentor
 /**
  * @param null|string $name
  */
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('signin');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $this->setOptions(['layout' => 'fluid']);
     $filter = $this->getInputFilter();
     //$groupBasic = new DisplayGroup('groupBasic');
     //$this->add($groupBasic);
     $csrf = new Csrf('csrf');
     $this->add($csrf);
     $filter->add(array('name' => 'csrf', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $mail = new Text('mail');
     $mail->setLabel('Email:');
     $mail->setAttributes(array('type' => 'text', 'id' => 'mail'));
     $this->add($mail);
     //$groupBasic->addElement($username);
     $filter->add(array('name' => 'mail', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập email đăng nhập'))), array('name' => 'EmailAddress', 'break_chain_on_failure' => true, 'options' => array('messages' => array('emailAddressInvalidFormat' => 'Địa chỉ email không hợp lệ'))))));
     $password = new Password('password');
     $password->setAttributes(array('type' => 'password', 'id' => 'password'));
     $password->setLabel('Mật khẩu:');
     $this->add($password);
     //$groupBasic->addElement($password);
     $filter->add(array('name' => 'password', 'required' => true, 'validators' => array(array('name' => 'NotEmpty', 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập mật khẩu'))))));
     $config = $this->getServiceLocator()->get('Config');
     $this->captcha = new ReCaptcha(array('pubkey' => $config['captcha']['reCAPTCHA']['publicKey'], 'privkey' => $config['captcha']['reCAPTCHA']['privateKey'], 'ssl' => !isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' ? false : true));
     $captcha = new Captcha('captcha');
     $captcha->setLabel('Mã bảo mật:');
     $captcha->setCaptcha($this->captcha);
     $this->add($captcha);
     //$groupBasic->addElement($captcha);
     $filter->add(array('name' => 'captcha', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập captcha'))), $this->captcha)));
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Đăng nhập', 'id' => 'btnSignin', 'class' => 'btn btn-primary col-md-12')));
     //$groupBasic->addElement($this->get('submit'));
 }
 /**
  * @param null|string $name
  */
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('userManageFilter');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'POST');
     $filter = $this->getInputFilter();
     $groupBasic = new DisplayGroup('groupBasic');
     $this->add($groupBasic);
     $fromCompanyId = new Text('fromCompanyId');
     $fromCompanyId->setLabel('From companyId:');
     $fromCompanyId->setAttributes(['maxlength' => 255, 'autocomplete' => 'off']);
     $this->add($fromCompanyId);
     $groupBasic->addElement($fromCompanyId);
     $filter->add(array('name' => 'fromCompanyId', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập fromCompanyId'))))));
     $fromRoleId = new Text('fromRoleId');
     $fromRoleId->setLabel('From role:');
     $fromRoleId->setAttributes(['autocomplete' => 'off']);
     $this->add($fromRoleId);
     $groupBasic->addElement($fromRoleId);
     $filter->add(array('name' => 'fromRoleId', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập fromRole'))))));
     $toCompanyId = new Text('toCompanyId');
     $toCompanyId->setLabel('To CompanyIds:');
     $toCompanyId->setAttributes(['autocomplete' => 'off']);
     $this->add($toCompanyId);
     $groupBasic->addElement($toCompanyId);
     $filter->add(array('name' => 'toCompanyId', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập toCompanyId'))))));
     $asRole = new Text('asRole');
     $asRole->setLabel('As role:');
     $asRole->setAttributes(['maxlength' => 255, 'autocomplete' => 'off']);
     $this->add($asRole);
     $groupBasic->addElement($asRole);
     $filter->add(array('name' => 'asRole', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập as role'))))));
     $this->add(array('name' => 'submit', 'options' => array('clearBefore' => true), 'attributes' => array('type' => 'submit', 'value' => 'Lưu', 'id' => 'btnSaveCrmContact', 'class' => 'btn btn-primary')));
 }
예제 #14
0
 /**
  * Load textstring prevalue editor
  *
  * @return Element\Text
  */
 public function load()
 {
     $config = $this->getConfig();
     $length = new Element\Text('length');
     $length->setAttributes(array('value' => isset($config['length']) ? $config['length'] : '', 'class' => 'form-control', 'id' => 'length'));
     $length->setOptions(array('label' => 'Length', 'label_attributes' => array('class' => 'required control-label col-lg-2')));
     return $length;
 }
예제 #15
0
 /**
  *
  * @param null|string $name
  */
 public function __construct($serviceLocator)
 {
     parent::__construct('ideaFilter');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'GET');
     $filter = $this->getInputFilter();
     $name = new Text('name');
     $name->setAttributes(['maxlength' => 255, 'placeholder' => 'Tên danh mục']);
     $this->add($name);
     $filter->add(array('name' => 'name', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $this->add(array('name' => 'submit', 'options' => array(), 'attributes' => array('type' => 'submit', 'value' => 'Lọc', 'id' => 'btnFilterCompanyContact', 'class' => 'btn btn-primary')));
 }
예제 #16
0
 public function __construct($name = null)
 {
     parent::__construct('page');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $title_text = new Element\Text('title');
     $title_text->setLabel('Title');
     $title_text->setLabelAttributes(array('class' => 'type_text type_text_short'));
     $title_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require'));
     $url_text = new Element\Text('url');
     $url_text->setLabel('Url');
     $url_text->setLabelAttributes(array('class' => 'type_text type_text_short'));
     $url_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => 'require'));
     $text_textarea = new Element\Textarea('text');
     $text_textarea->setLabel('Text');
     $text_textarea->setLabelAttributes(array('class' => 'type_text'));
     $text_textarea->setAttributes(array('placeholder' => 'Type something...'));
     $auto_check = new Element\Checkbox('auto');
     $auto_check->setLabel('Automatically');
     $auto_check->setLabelAttributes(array('class' => 'type_text type_check'));
     $auto_check->setUseHiddenElement(true);
     $auto_check->setCheckedValue("1");
     $auto_check->setUncheckedValue("0");
     $auto_check->setValue('1');
     $meta_text = new Element\Text('meta');
     $meta_text->setLabel('Meta');
     $meta_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $meta_text->setAttributes(array('class' => 'type_text_input'));
     $keywords_text = new Element\Text('keywords');
     $keywords_text->setLabel('Keywords');
     $keywords_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $keywords_text->setAttributes(array('class' => 'type_text_input'));
     $desc_text = new Element\Text('description');
     $desc_text->setLabel('Description');
     $desc_text->setLabelAttributes(array('class' => 'type_text type_text_mod_darker'));
     $desc_text->setAttributes(array('class' => 'type_text_input'));
     $submit_button = new Element\Submit('submit');
     $submit_button->setValue('Submit');
     $submit_button->setAttributes(array('class' => 'btn btn_white'));
     $cancel_button = new Element\Submit('cancel');
     $cancel_button->setValue('Cancel');
     $cancel_button->setAttributes(array('class' => 'btn btn_rozy'));
     $this->add($id_hidden);
     $this->add($title_text);
     $this->add($url_text);
     $this->add($text_textarea);
     $this->add($auto_check);
     $this->add($meta_text);
     $this->add($keywords_text);
     $this->add($desc_text);
     $this->add($submit_button);
     $this->add($cancel_button);
 }
예제 #17
0
 public function __construct(array $categorias = null, array $membros = null, array $cidades = null, array $estados = null, $name = null, $options = null)
 {
     parent::__construct('membro', $options);
     $this->setInputFilter(new PerguntaFilter());
     $this->setAttribute('method', 'Post');
     $id = new Element\Hidden('id');
     $this->add($id);
     $nome = new Element\Text("nome");
     $nome->setAttributes(array('class' => 'form-control', 'placeholder' => 'Entre com a pergunta'));
     $this->add($nome);
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Salvar', 'class' => 'btn btn-success col-xs-6 col-md-5 btnSpacer')));
 }
예제 #18
0
파일: NewsForm.php 프로젝트: hopealive/ds
 public function addElements()
 {
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $element = new Element\Text('title');
     $element->setAttributes(array('class' => 'username', 'size' => '30', 'class' => 'form-control', 'placeholder' => 'title'));
     $this->add($element);
     $element = new Element\Textarea('body');
     $element->setAttributes(array('size' => '30', 'class' => 'form-control editor', 'placeholder' => 'body'));
     $this->add($element);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Send', 'id' => 'submitbutton', 'class' => 'form-control btn btn-primary')));
 }
예제 #19
0
 public function __construct($name = null, $options = array())
 {
     parent::__construct(isset($name) ? $name : 'personal');
     $id_hidden = new Element\Hidden('id');
     $id_hidden->setName('id');
     $firstname_text = new Element\Text('firstname');
     $firstname_text->setLabel('First name');
     $firstname_text->setLabelAttributes(array('class' => 'type_text'));
     $firstname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...'));
     $lastname_text = new Element\Text('lastname');
     $lastname_text->setLabel('Last name');
     $lastname_text->setLabelAttributes(array('class' => 'type_text'));
     $lastname_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type something...', 'required' => true));
     $country_select = new Element\Select('country_id');
     $country_select->setLabel('Country');
     $country_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $country_select->setAttributes(array('class' => 'sel_chosen'));
     $country_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your country'));
     $state_select = new Element\Select('state_id');
     $state_select->setLabel('Province/State');
     $state_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $state_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $state_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your state'));
     $city_select = new Element\Select('city_id');
     $city_select->setLabel('City');
     $city_select->setLabelAttributes(array('class' => 'select f_3_w50'));
     $city_select->setAttributes(array('class' => 'sel_chosen', 'required' => true));
     $city_select->setOptions(array('disable_inarray_validator' => true, 'empty_option' => 'Please choose your city'));
     $adress_text = new Element\Text('adress');
     $adress_text->setLabel('Adress');
     $adress_text->setLabelAttributes(array('class' => 'type_text'));
     $adress_text->setAttributes(array('class' => 'type_text_input', 'placeholder' => 'Type adress in format (наш формат)'));
     $languages_select = new Element\Select('languages');
     $languages_select->setLabel('Languages');
     $languages_select->setLabelAttributes(array('class' => 'select', 'style' => 'float:left;'));
     $languages_select->setAttributes(array('class' => 'sel_chosen', 'multiple' => 'multiple', 'required' => true));
     $languages_select->setOptions(array('disable_inarray_validator' => true));
     $logo = new Element\Image('logo');
     $logo->setAttributes(array('src', '/images/11.jpg', 'style' => 'float:left;'));
     $file = new Element\File('file');
     $file->setLabelAttributes(array('style' => 'float:left;clear:both'));
     $this->add($id_hidden);
     $this->add($firstname_text);
     $this->add($lastname_text);
     $this->add($country_select);
     $this->add($state_select);
     $this->add($city_select);
     $this->add($adress_text);
     $this->add($languages_select);
     $this->add($logo);
     $this->add($file);
 }
예제 #20
0
 public function addElements()
 {
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $element = new Element\Text('name');
     $element->setAttributes(array('class' => 'name', 'size' => '30', 'class' => 'form-control', 'placeholder' => 'name'));
     $this->add($element);
     $element = new Element\Select('parent_id');
     $element->setAttributes(array('class' => 'form-control ', 'placeholder' => 'parent'));
     $element->setValueOptions(array(0 => 'Main'));
     $this->add($element);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Send', 'id' => 'submitbutton', 'class' => 'form-control btn btn-primary')));
 }
예제 #21
0
 /**
  * @param null|string $username
  */
 public function __construct($serviceLocator)
 {
     parent::__construct('userManageFilter');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'GET');
     $filter = $this->getInputFilter();
     $companyId = $this->addElementCompany('companyId', null, ['required' => false]);
     $departmentId = new Select('departmentId');
     $departmentId->setValueOptions(['' => '- Phòng ban -']);
     $this->add($departmentId);
     $this->loadDepartments($departmentId, $companyId);
     $filter->add(array('name' => 'departmentId', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $id = new Text('id');
     $id->setAttributes(['maxlength' => 255, 'placeholder' => 'ID']);
     $this->add($id);
     $filter->add(array('name' => 'id', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $username = new Text('username');
     $username->setAttributes(['maxlength' => 255, 'placeholder' => 'Họ tên']);
     $this->add($username);
     $filter->add(array('name' => 'username', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $email = new Text('email');
     $email->setAttributes(['maxlength' => 255, 'placeholder' => 'Email']);
     $this->add($email);
     $filter->add(array('name' => 'email', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     //phân quyền riêng
     $hasPrivateRole = new Select('hasPrivateRole');
     $hasPrivateRole->setValueOptions(array('' => '- Phân quyền riêng -', '1' => 'Có ', '-1' => 'Không '));
     $this->add($hasPrivateRole);
     $filter->add(array('name' => 'hasPrivateRole', 'required' => false));
     $user = new \User\Model\User();
     $roleValues = array('' => '- Quyền hạn -') + $user->getRoleDisplays();
     unset($roleValues[$user::ROLE_SUPERADMIN]);
     $role = new Select('role');
     $role->setValueOptions($roleValues);
     $this->add($role);
     $filter->add(array('name' => 'role', 'required' => false, 'filters' => array(array('name' => 'StringTrim'), array('name' => 'Digits'))));
     $roleCompany = new Select('roleCompany');
     $roleCompany->setValueOptions(['' => '- Nhóm quyền -']);
     $this->add($roleCompany);
     $this->loadRole($roleCompany, $companyId);
     $filter->add(array('name' => 'roleCompany', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $active = new Select('active');
     $active->setValueOptions(array('' => '- Kích hoạt', '1' => 'Đã kích hoạt', '-1' => 'Chưa kích hoạt'));
     $this->add($active);
     $filter->add(array('name' => 'active', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $locked = new Select('locked');
     $locked->setValueOptions(array('' => '- Khóa -', '1' => 'Đã khóa', '-1' => 'Chưa khóa'));
     $this->add($locked);
     $filter->add(array('name' => 'locked', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $this->add(array('name' => 'submit', 'options' => array(), 'attributes' => array('type' => 'submit', 'value' => 'Lọc', 'id' => 'btnFilterCrmContact', 'class' => 'btn btn-primary')));
 }
예제 #22
0
 /**
  * Load Textarea prevalue editor
  * - cols:   Number of caracters display per line
  * - rows:   Define the number of line visible in text zone
  * - wrap:   Possible values are : hard / off / soft
  *                       define if line returns are automatic (hard / soft)
  *                       or if the horizontal display if exceeded (off)
  *
  * @return mixed
  */
 public function load()
 {
     $config = $this->getConfig();
     $cols = new Element\Text('cols');
     $cols->setAttributes(array('value' => isset($config['cols']) ? $config['cols'] : '', 'class' => 'form-control'));
     $cols->setOptions(array('label' => 'Cols', 'label_attributes' => array('class' => 'required control-label col-lg-2')));
     $rows = new Element\Text('rows');
     $rows->setAttributes(array('value' => isset($config['rows']) ? $config['rows'] : '', 'class' => 'form-control'));
     $rows->setOptions(array('label' => 'Rows', 'label_attributes' => array('class' => 'required control-label col-lg-2')));
     $wrap = new Element\Select('wrap');
     $wrap->setAttributes(array('class' => 'form-control', 'options' => array('hard' => 'hard', 'off' => 'off', 'soft' => 'soft'), 'value' => isset($config['wrap']) ? $config['wrap'] : ''));
     $wrap->setOptions(array('label' => 'Wrap', 'label_attributes' => array('class' => 'required control-label col-lg-2')));
     return array($cols, $rows, $wrap);
 }
예제 #23
0
 /**
  * @param null|string $name
  */
 public function __construct($serviceLocator)
 {
     parent::__construct($serviceLocator);
     $filter = $this->getInputFilter();
     $username = new Text('username');
     $username->setAttributes(['placeholder' => 'Tên nhân viên']);
     $filter->add(array('name' => 'username', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $this->add($username);
     $role = new Select('role');
     $role->setValueOptions(['' => '- Nhóm -', User::ROLE_MENTOR => 'Mentor', User::ROLE_CALLCENTER => 'Callcenter']);
     $filter->add(array('name' => 'role', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $this->add($role);
     $this->add(array('name' => 'submit', 'options' => array(), 'attributes' => array('type' => 'submit', 'value' => 'Lọc', 'id' => 'btnFilterCrmContact', 'class' => 'btn btn-primary')));
 }
예제 #24
0
 public function __construct($name = null, $options = null)
 {
     parent::__construct('resposta', $options);
     $this->setInputFilter(new RespostaFilter());
     $this->setAttribute('method', 'Post');
     $id = new Element\Hidden('id');
     $this->add($id);
     $nome = new Element\Text("nome");
     $nome->setAttributes(array('class' => 'form-control', 'placeholder' => 'Entre com a pergunta', 'disabled' => true));
     $this->add($nome);
     $resposta = new Element\Radio('resposta');
     $resposta->setValueOptions(array('1' => 'Sim', '0' => 'Não'));
     $this->add($resposta);
     $this->add(array('name' => 'submit', 'type' => 'Submit', 'attributes' => array('value' => 'Salvar', 'class' => 'btn btn-success col-xs-6 col-md-5 btnSpacer')));
 }
예제 #25
0
 public function __construct($name = null)
 {
     parent::__construct('user');
     $this->setAttribute('method', 'post');
     $this->add(array('name' => 'id', 'attributes' => array('type' => 'hidden')));
     $element = new Element\Text('name');
     $element->setAttributes(array('size' => '30', 'class' => 'form-control', 'placeholder' => 'name'));
     $this->add($element);
     $element = new Element\Text('setting');
     $element->setAttributes(array('size' => '30', 'class' => 'form-control', 'placeholder' => 'setting'));
     $this->add($element);
     $element = new Element\Checkbox('is_active');
     $element->setAttributes(array('size' => '30', 'placeholder' => 'is active', 'label' => 'is active'));
     $this->add($element);
     $this->add(array('name' => 'submit', 'attributes' => array('type' => 'submit', 'value' => 'Send', 'id' => 'submitbutton', 'class' => 'form-control btn btn-primary')));
 }
예제 #26
0
 public function __construct(OrmCongregacao $orm = null)
 {
     parent::__construct("formProduto");
     $txtId = new Element\Hidden("id");
     $txtNome = new Element\Text("nome");
     $txtNome->setAttributes(array('class' => 'form-control', 'placeholder' => 'Nome da Congregação', 'data-parsley-trigger' => 'change', 'pattern' => '^[aA-zZ]+((\\s[aA-zZ]+)+)?$', 'required' => 'true'));
     $txtCep = new Element\Text("cep");
     $txtCep->setAttributes(array('class' => 'form-control', 'placeholder' => 'XXXXXXXX', 'data-parsley-trigger' => 'change', 'pattern' => '/^[0-9]{2}[0-9]{3}[0-9]{3}$/', 'max-length' => '8', 'required' => 'true'));
     $txtNumero = new Element\Text("numero");
     $txtNumero->setAttributes(array('class' => 'form-control', 'placeholder' => 'Numero', 'data-parsley-trigger' => 'change', 'pattern' => '/^[0-9]+$/', 'max-length' => '6', 'required' => 'true'));
     $txtLogradouro = new Element\Text("logradouro");
     $txtLogradouro->setAttributes(array('class' => 'form-control', 'placeholder' => 'Ex: Rua, Avenida, Travessa...', 'required' => 'true'));
     $txtBairro = new Element\Text("bairro");
     $txtBairro->setAttributes(array('class' => 'form-control', 'required' => 'true'));
     $txtCidade = new Element\Text("cidade");
     $txtCidade->setAttributes(array('class' => 'form-control', 'required' => 'true'));
     $txtUf = new Element\Text("uf");
     $txtUf->setAttributes(array('class' => 'form-control', 'max-length' => '2', 'required' => 'true'));
     $iToken = new Element\Csrf("iToken");
     $btnSalvar = new Element\Button('salvar');
     $btnSalvar->setAttributes(array('class' => 'btn btn-darkgray btn-ef btn-ef-4 btn-ef-4c mb-10', 'type' => 'button'));
     $btnVoltar = new Element\Button('voltar');
     $btnVoltar->setAttributes(array('class' => 'btn btn-blue btn-ef btn-ef-4 btn-ef-4c mb-10', 'type' => 'button'));
     if ($orm != null) {
         $txtId->setValue($orm->getId());
         $txtNome->setValue($orm->getNome());
         $txtCep->setValue($orm->getCep());
         $txtNumero->setValue($orm->getNumero());
         $txtLogradouro->setValue($orm->getLogradouro());
         $txtBairro->setValue($orm->getBairro());
         $txtCidade->setValue($orm->getCidade());
         $txtUf->setValue($orm->getUf());
     }
     //
     $this->add($txtId);
     $this->add($txtNome);
     $this->add($txtCep);
     $this->add($txtNumero);
     $this->add($txtLogradouro);
     $this->add($txtBairro);
     $this->add($txtCidade);
     $this->add($txtUf);
     $this->add($iToken);
     $this->add($btnSalvar);
     $this->add($btnVoltar);
     $this->setAttributes(array('id' => 'form', 'data-parsley-validate' => NULL));
 }
예제 #27
0
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('ExpenseCategoryIndex');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $filter = $this->getInputFilter();
     $group = new DisplayGroup('Expensegroup');
     $group->setLabel('Thêm tài khoản');
     $this->add($group);
     /*
      * $parentId = new Select('parentId'); $parentId->setLabel('Công ty mẹ:'); $parentId->setAttributes([ 'maxlength' => 19 ]); $this->add($parentId); $groupCompany->addElement($parentId); $this->loadCompanies($parentId); $filter->add(array( 'name' => 'parentId', 'required' => false ));
      */
     // companyId
     $companyId = $this->addElementCompany('companyId', $group, ['required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa chọn công ty'))))]);
     // name
     $name = new Text('name');
     $name->setLabel('Tên khoản mục:');
     $name->setAttributes(['maxlength' => 255]);
     $this->add($name);
     $group->addElement($name);
     $filter->add(array('name' => 'name', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập tên khoản mục'))))));
     // parent Text
     $parentName = new Text('parentName');
     $parentName->setLabel('Thuộc khoản mục:');
     $this->add($parentName);
     $group->addElement($parentName);
     $filter->add(array('name' => 'parentName', 'required' => false));
     // parent hidden
     $parentId = new Hidden('parentId');
     $this->add($parentId);
     $group->addElement($parentId);
     $filter->add(array('name' => 'parentId', 'required' => false));
     // code
     $code = new Text('code');
     $code->setLabel('Mã code:');
     $code->setAttributes(['maxlength' => 255]);
     $this->add($code);
     $group->addElement($code);
     $filter->add(array('name' => 'code', 'required' => true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập mã code'))))));
     // id hidden
     $id = new Hidden('id');
     $this->add($id);
     $group->addElement($id);
     $filter->add(array('name' => 'id', 'required' => false));
     $this->add(array('name' => 'afterSubmit', 'type' => 'radio', 'attributes' => array('value' => '/accounting/expense/addcategory'), 'options' => array('layout' => 'fluid', 'clearBefore' => true, 'label' => 'Sau khi lưu dữ liệu:', 'value_options' => array('/accounting/expense/addcategory' => 'Tiếp tục nhập', '/accounting/expense/category' => 'Hiện danh sách vừa nhập'))));
     $this->add(array('name' => 'submit', 'options' => array('clearBefore' => true), 'attributes' => array('type' => 'submit', 'value' => 'Lưu', 'id' => 'btnSave', 'class' => 'btn btn-primary')));
 }
예제 #28
0
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('AccountIndex');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $filter = $this->getInputFilter();
     $group = new DisplayGroup('Subject');
     $group->setLabel('Thêm mentor');
     $this->add($group);
     // name
     $userName = new Text('userName');
     $userName->setLabel('Người dùng: ');
     $userName->setAttributes(['maxlength' => 255]);
     if ($options == 'edit') {
         $userName->setAttribute('disabled', 'disabled');
     }
     $this->add($userName);
     $group->addElement($userName);
     $filter->add(array('name' => 'userName', 'required' => $options == 'edit' ? false : true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập người dùng'))))));
     $userId = new Hidden('userId');
     $this->add($userId);
     $group->addElement($userId);
     $filter->add(array('name' => 'userId', 'required' => $options == 'edit' ? false : true, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập người dùng'))))));
     // code
     $description = new Textarea('description');
     $description->setLabel('Mô tả mentor:');
     $description->setAttributes(['class' => 'form-control basicEditor ', 'style' => 'min-height: 300px;']);
     $this->add($description);
     $group->addElement($description);
     $filter->add(array('name' => 'description', 'required' => false, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập mô tả môn học'))))));
     $subject = new Text('subject');
     $subject->setLabel('Tên môn:');
     $subject->setAttributes(['maxlength' => 255, 'style' => 'width:100% !important', 'placeholder' => 'Tên môn học']);
     $subject->setOptions(array('tagsinput' => true, 'description' => 'Tên môn học'));
     $this->add($subject);
     $group->addElement($subject);
     $filter->add(array('name' => 'subject', 'required' => false, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập tên môn'))))));
     $subjectId = new Hidden('subjectId');
     $subjectId->setLabel('Tên môn:');
     $this->add($subjectId);
     $group->addElement($subjectId);
     $filter->add(array('name' => 'subjectId', 'required' => false, 'filters' => array(array('name' => 'StringTrim')), 'validators' => array(array('name' => 'NotEmpty', 'break_chain_on_failure' => true, 'options' => array('messages' => array('isEmpty' => 'Bạn chưa nhập tên môn'))))));
     $this->add(array('name' => 'afterSubmit', 'type' => 'radio', 'attributes' => array('value' => '/admin/expert/add'), 'options' => array('layout' => 'fluid', 'clearBefore' => true, 'label' => 'Sau khi lưu dữ liệu:', 'value_options' => array('/admin/expert/add' => 'Tiếp tục nhập', '/admin/expert/index' => 'Hiện danh sách vừa nhập'))));
     $this->add(array('name' => 'submit', 'options' => array('clearBefore' => true), 'attributes' => array('type' => 'submit', 'value' => 'Lưu', 'id' => 'btnSave', 'class' => 'btn btn-primary')));
 }
예제 #29
0
 /**
  * Form initialization.
  * 
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Job Name
     $name = new Element\Text('name');
     $name->setLabel('Job Name');
     $name->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control'));
     $this->add($name);
     // Command
     $command = new Element\Textarea('command');
     $command->setLabel('Command');
     $command->setAttributes(array('autocomplete' => 'off', 'class' => 'form-control command'));
     $this->add($command);
     // Add fieldset wrapping all time options
     $this->add($this->getTimeFieldset());
     // Add fieldset wrapping all repeat options
     $this->add($this->getRepeatFieldset());
 }
예제 #30
0
 public function __construct($serviceLocator, $options = null)
 {
     parent::__construct('AccountIndex');
     $this->setServiceLocator($serviceLocator);
     $this->setAttribute('method', 'post');
     $filter = $this->getInputFilter();
     $group = new DisplayGroup('Search');
     $group->setLabel('Tìm kiếm trợ giúp');
     $this->add($group);
     // search
     $search = new Text('search');
     $search->setLabel('Tôi cần giúp về: ');
     $search->setAttributes(['maxlength' => 255]);
     $this->add($search);
     $group->addElement($search);
     $filter->add(array('name' => 'search', 'required' => false, 'filters' => array(array('name' => 'StringTrim'))));
     $this->add(array('name' => 'submit', 'options' => array('clearBefore' => true), 'attributes' => array('type' => 'submit', 'value' => 'Lưu', 'id' => 'btnSave', 'class' => 'btn btn-primary')));
 }