public function __construct() { parent::__construct(null); $this->setInputFilter(new ReuniaoFilter()); $this->setAttribute('method', 'POST')->setAttribute('enctype', 'multipart/form-data'); $id = new \Zend\Form\Element\Hidden('id'); $this->add($id); $data = new Text('data'); $data->setLabel('Data')->setAttribute('autofocus', 'autofocus'); $this->add($data); $eventos = new Text('eventos'); $eventos->setLabel('Evento')->setAttribute('placeholder', 'Entre com o evento')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($eventos); $pauta = new Text('pauta'); $pauta->setLabel('Pauta')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($pauta); $cardapio = new Textarea('cardapio'); $cardapio->setLabel('Cardápio')->setAttribute('cols', '60')->setAttribute('rows', '5'); $this->add($cardapio); $listaPresente = new Textarea('lista_presente'); $listaPresente->setLabel('Lista de Presente')->setAttribute('cols', '60')->setAttribute('rows', '5'); $this->add($listaPresente); $ata = new Text('ata'); $ata->setLabel('Ata')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($ata); $imagnes = new File('imagens'); $imagnes->setLabel('Imagens')->setAttribute('id', 'imagnes'); $this->add($imagnes); $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success')); $this->add($button); }
/** * GeradorForm constructor. */ public function __construct() { parent::__construct(null); $this->setAttribute('method', 'POST'); $this->setInputFilter(new CriarFormFilter()); //Input strModuleName $strModuleName = new Text('strModuleName'); $strModuleName->setLabel('strModuleName')->setAttributes(array('maxlength' => 100, 'class' => 'form-control')); $this->add($strModuleName); //Input strFormName $strFormName = new Text('strFormName'); $strFormName->setLabel('strFormName')->setAttributes(array('maxlength' => 100, 'class' => 'form-control')); $this->add($strFormName); //Input strFilterName $strFilterName = new Text('strFilterName'); $strFilterName->setLabel('strFilterName')->setAttributes(array('maxlength' => 100, 'class' => 'form-control')); $this->add($strFilterName); //Input strTableName $strTableName = new Text('strTableName'); $strTableName->setLabel('strTableName')->setAttributes(array('maxlength' => 100, 'class' => 'form-control')); $this->add($strTableName); //Botao submit $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success', 'value' => 'Criar')); $this->add($button); }
public function __construct() { // we want to ignore the name passed parent::__construct('Attachment'); $this->add(new Element\Hidden('target_type_object')); $this->add(new Element\Hidden('target_id_row')); $this->setAttribute('method', 'post'); $nid_lov_attachmenttype = new Element\Select('nid_lov_attachmenttype'); $nid_lov_attachmenttype->setLabel('Attachment Type')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('' => 'Select a attachment type')); $this->add($nid_lov_attachmenttype); $url_or_filepath = new Element\Text('url_or_filepath'); $url_or_filepath->setLabel('Url or file path')->setAttributes(array('class' => 'form-control input-sm')); $this->add($url_or_filepath); $filename = new Element\Text('filename'); $filename->setLabel('File Name')->setAttributes(array('class' => 'form-control input-sm')); $this->add($filename); $filesize = new Element\Text('filesize'); $filesize->setLabel('File Size')->setAttributes(array('class' => 'form-control input-sm')); $this->add($filesize); $mimetype = new Element\Text('mimetype'); $mimetype->setLabel('Mime Type')->setAttributes(array('class' => 'form-control input-sm')); $this->add($mimetype); $bool_active = new Element\Radio('bool_active'); $bool_active->setLabel('Is Active?')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No'))->setAttributes(array('class' => 'medwhite')); $this->add($bool_active); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm')); $this->add($comment); $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('usuariosform'); $this->setAttribute('method', 'post'); $this->setAttribute('role', 'form'); $this->setAttributes(array('id' => 'usuariosform')); $usuarios_id = new Element('usuarios_id'); $usuarios_id->setLabel('ID'); $usuarios_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'usuarios_id', 'readonly' => 'readonly', 'class' => 'form-control')); $usuarios_username = new Element('usuarios_username'); $usuarios_username->setLabel('Usuario'); $usuarios_username->setAttributes(array('type' => 'text', 'placeholder' => 'dvader', 'id' => 'usuarios_username', 'class' => 'form-control')); $usuarios_nombres = new Element('usuarios_nombres'); $usuarios_nombres->setLabel('Nombre'); $usuarios_nombres->setAttributes(array('type' => 'text', 'placeholder' => 'Darth Vader', 'id' => 'usuarios_nombres', 'class' => 'form-control')); $usuarios_estado = new Element\Select('usuarios_estado'); $usuarios_estado->setLabel('Estado'); //$usuarios_estado->setEmptyOption('ELige un Estado..'); $usuarios_estado->setOptions(array('disable_inarray_validator' => true)); $usuarios_estado->setAttributes(array('id' => 'usuarios_estado', 'class' => "form-control", 'data-rule-required' => "true", 'data-msg-required' => "Debe seleccionar el Estado")); $guardar = new Element\Button('guardar'); $guardar->setAttributes(array('class' => 'btn btn-success mr5', 'type' => 'submit', 'id' => 'guardar')); $guardar->setOptions(array('label' => '<i class="glyphicon glyphicon-floppy-disk"></i>', 'label_options' => array('disable_html_escape' => true))); $this->add($usuarios_id); $this->add($usuarios_username); $this->add($usuarios_nombres); $this->add($usuarios_estado); $this->add($guardar); }
public function __construct(ObjectManager $objectManager) { $this->setObjectManager($objectManager); parent::__construct(null); $this->setAttribute('method', 'POST'); $this->setAttribute('class', 'form-horizontal'); //Input Titulo $titulo = new Text('titulo'); $titulo->setLabel('Titulo')->setAttributes(array('maxlength' => 80)); $this->add($titulo); //Input Descrição $descricao = new Textarea('descricao'); $descricao->setLabel('descriçao')->setAttributes(array('maxlength' => 150)); $this->add($descricao); //Input Titulo $texto = new Textarea('texto'); $texto->setLabel('Texto'); $this->add($texto); $ativo = new Checkbox('ativo'); $ativo->setLabel('Ativo'); $this->add($ativo); $categoria = new ObjectSelect('category'); $categoria->setLabel('Categoria')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => '\\Base\\Orm\\Entities\\Category', 'property' => 'nome', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('nome' => 'ASC'))))); $this->add($categoria); //Botao submit $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn')); $this->add($button); $this->setInputFilter(new PostFilter($categoria->getValueOptions())); }
public function __construct() { // we want to ignore the name passed parent::__construct('resp'); $this->setAttribute('method', 'post'); $name_resp = new Element\Text('name_resp'); $name_resp->setLabel('Responsibility')->setAttributes(array('class' => 'form-control input-sm')); $this->add($name_resp); $nid_lov_resptype = new Element\Select('nid_lov_resptype'); $nid_lov_resptype->setLabel('Type')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a type')); $this->add($nid_lov_resptype); $nid_timezone = new Element\Select('nid_timezone'); $nid_timezone->setLabel('Time Zone')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a timezone')); $this->add($nid_timezone); $id_locale = new Element\Select('nid_locale'); $id_locale->setLabel('Locale')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('0' => 'Select a locale')); $this->add($id_locale); $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); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm')); $this->add($comment); $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() { // 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); }
/** * LancamentosForm constructor. * @param ObjectManager $objectManager */ public function __construct(ObjectManager $objectManager) { $this->setObjectManager($objectManager); parent::__construct(null); $this->setAttribute('method', 'POST'); $this->setAttribute('class', 'form-horizontal'); $prioridade = new ObjectSelect('prioridade'); $prioridade->setLabel('Prioridade')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Prioridade\\Entity\\Prioridade', 'property' => 'name', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('name' => 'ASC')))))->setAttributes(array('class' => 'form-control')); $this->add($prioridade); $categoria = new ObjectSelect('categoria'); $categoria->setLabel('Categoria')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Categoria\\Entity\\Categoria', 'property' => 'name', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('name' => 'ASC')))))->setAttributes(array('class' => 'form-control')); $this->add($categoria); $operacao = new ObjectSelect('operacao'); $operacao->setLabel('Operacoes')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Operacoes\\Entity\\Operacoes', 'property' => 'name', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('name' => 'ASC')))))->setAttributes(array('class' => 'form-control')); $this->add($operacao); $origem = new ObjectSelect('origem'); $origem->setLabel('Origem')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Origem\\Entity\\Origem', 'property' => 'name', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('name' => 'ASC')))))->setAttributes(array('class' => 'form-control')); $this->add($origem); //Input Saldo Inicial $valorInicial = new Text('valorInicial'); $valorInicial->setLabel('Valor Inicial')->setAttributes(array('maxlength' => 10, 'class' => 'form-control')); $this->add($valorInicial); //Input Saldo Inicial $valorFinal = new Text('valorFinal'); $valorFinal->setLabel('Valor Final')->setAttributes(array('maxlength' => 10, 'class' => 'form-control')); $this->add($valorFinal); $tipo = new ObjectSelect('tipo'); $tipo->setLabel('Tipo')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Tipo\\Entity\\Tipo', 'property' => 'name', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('name' => 'ASC')))))->setAttributes(array('class' => 'form-control')); $this->add($tipo); //Botao submit $button = new Button('submit'); $button->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success', 'value' => 'Salvar')); $this->add($button); $this->setInputFilter(new LancamentosFilter($categoria->getValueOptions(), $operacao->getValueOptions(), $origem->getValueOptions(), $tipo->getValueOptions(), $prioridade->getValueOptions())); }
public function __construct($name, $options = array()) { parent::__construct($name, $options); $this->submitElement = new Button(self::SUBMIT); $this->submitElement->setAttributes(array('type' => 'submit', 'class' => 'btn btn-primary', 'data-loading' => FakeTranslator::translate('Saving...')))->setLabel(FakeTranslator::translate("Save")); $this->add($this->submitElement); }
public function __construct($name = null) { parent::__construct('datbaseform'); $this->setAttribute('class', 'p-t-15'); $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal')); $username = new Element('username'); $username->setLabel('Nombre de Usuario:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $username->setAttributes(array('type' => 'text', 'placeholder' => 'ej. Admin', 'id' => 'username', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres")); $password = new Element\Password('password'); $password->setLabel('Contraseña:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required')); $password->setAttributes(array('placeholder' => 'No uses 1234 ;)', 'id' => 'password', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno")); $confirmaPassword = new Element\Password('confirmaPassword'); $confirmaPassword->setLabel(' ')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $confirmaPassword->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'confirmaPassword', 'class' => 'form-control')); $email = new Element\Email('email'); $email->setLabel('Correo Electrónico:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $email->setAttributes(array('placeholder' => '*****@*****.**', 'id' => 'email', 'class' => 'form-control')); $buttonContinuar = new Element\Button('buttonContinuar'); $buttonContinuar->setLabel('Instalar'); $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar')); $buttonLimpiar = new Element\Button('buttonLimpiar'); $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true)); $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset')); $this->add($username); $this->add($password); $this->add($email); $this->add($confirmaPassword); $this->add($buttonContinuar); $this->add($buttonLimpiar); }
public function __construct() { parent::__construct(); $this->add(array('name' => 'need', 'type' => 'Zend\\Form\\Element\\Checkbox', 'options' => array('label' => 'You have a need'), 'attributes' => array('type' => 'checkbox', 'class' => 'help'))); $this->add(array('name' => 'want', 'type' => 'Zend\\Form\\Element\\Checkbox', 'options' => array('label' => 'You have a want'), 'attributes' => array('type' => 'checkbox', 'class' => 'help'))); $this->add(array('name' => 'read', 'type' => 'Zend\\Form\\Element\\Checkbox', 'options' => array('label' => 'You have a want'), 'attributes' => array('type' => 'checkbox', 'class' => 'read'))); $this->add(array('name' => 'username', 'options' => array('label' => 'Username'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'name', 'placeholder' => 'Full Name e.g:00 000 000'))); $this->add(['name' => "phone", 'options' => ['label' => 'Mobile number'], 'attributes' => ['type' => 'text', 'class' => 'form-control', 'id' => 'phone', 'placeholder' => 'Mobile Number e.g:00 000 000']]); $this->add(array('name' => 'email', 'options' => array('label' => 'Email'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'email', 'placeholder' => 'Email ID'))); $this->add(array('name' => 'display_name', 'options' => array('label' => 'Display Name'), 'attributes' => array('type' => 'text', 'class' => 'form-control'))); $this->add(array('name' => 'password', 'type' => 'password', 'options' => array('label' => 'Password'), 'attributes' => array('type' => 'password', 'class' => 'form-control', 'id' => 'password', 'placeholder' => 'Password'))); $this->add(array('name' => 'passwordVerify', 'type' => 'password', 'options' => array('label' => 'Password Verify'), 'attributes' => array('type' => 'password', 'class' => 'form-control', 'id' => 'confirm_password', 'placeholder' => 'Confirm Password'))); $this->add(array('name' => 'cvv', 'options' => array('label' => 'CVV'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'cvc', 'placeholder' => 'CVV'))); $this->add(array('name' => 'credit_card', 'options' => array('label' => 'Credit card number'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'card-number', 'placeholder' => 'Credit Card'))); $this->add(array('name' => 'expiration_date', 'options' => array('label' => 'Expiration date'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'date', 'placeholder' => 'Expiration Date e.g: mm/yyyy'))); $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'language', 'attributes' => ['options' => ['Select Language' => 'Select Language', 'En' => 'En', 'Fr' => 'Fr'], 'class' => 'form-control', 'id' => 'language'], 'options' => array('label' => 'Which is your mother tongue?'))); $this->add(array('name' => 'postalCode', 'options' => array('label' => 'Postal Code'), 'attributes' => array('type' => 'text', 'class' => 'form-control', 'id' => 'postal_code', 'placeholder' => 'Postal Code e.g: 000 000'))); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Submit')->setAttributes(array('type' => 'submit', 'class' => 'btn_one')); $this->add($submitElement, array('priority' => -100)); $this->add(array('name' => 'userId', 'type' => 'Zend\\Form\\Element\\Hidden', 'attributes' => array('type' => 'hidden'))); // @TODO: Fix this... getValidator() is a protected method. //$csrf = new Element\Csrf('csrf'); //$csrf->getValidator()->setTimeout($this->getRegistrationOptions()->getUserFormTimeout()); //$this->add($csrf); }
public function __construct(ObjectManager $objectManager) { $this->setObjectManager($objectManager); parent::__construct(null); $this->setAttributes(array('method' => 'POST', 'accept-charset' => 'UTF-8', 'class' => 'form-horizontal')); //input Titulo $nome = new Text('nome'); $nome->setLabel('Nome')->setAttributes(array('id' => 'nome', 'maxlength' => 80, 'class' => 'form-control')); $this->add($nome); //input email $email = new Text('email'); $email->setLabel("email")->setAttributes(array('id' => 'email', 'maxlength' => 150, 'class' => 'form-control')); $this->add($email); //nivel_id $nivel = new ObjectSelect('nivel'); $nivel->setLabel('Nivel')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Nivel\\Entity\\Nivel', 'property' => 'nome', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('nome' => 'ASC')))))->setAttributes(array('id' => 'nivel', 'class' => 'form-control')); $this->add($nivel); //login_id $login = new Text('login'); $login->setLabel('Login')->setAttributes(array('id' => 'login', 'maxlength' => 45, 'class' => 'form-control'))->setLabelAttributes(array()); $this->add($login); //botao submit $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-default')); $this->add($button); $this->setInputFilter(new UsuarioEditFilter($nivel->getValueOptions())); }
public function __construct() { // we want to ignore the name passed parent::__construct('timezone'); $this->setAttribute('method', 'post'); $name_timezone = new Element\Text('name_timezone'); $name_timezone->setLabel('Timezone')->setAttributes(array('class' => 'form-control input-sm')); $this->add($name_timezone); $num_timezone = new Element\Text('num_timezone'); $num_timezone->setLabel('Timezone Number')->setAttributes(array('class' => 'form-control input-sm')); $this->add($num_timezone); $bool_daylight_saving = new Element\Radio('bool_daylight_saving'); $bool_daylight_saving->setLabel('Daylight Saving')->setLabelAttributes(array('class' => 'checkbox-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No')); $this->add($bool_daylight_saving); $dt_summer_time_begin = new Element\Text('dt_summer_time_begin'); $dt_summer_time_begin->setLabel('Summer Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_summer_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true'))); $this->add($dt_summer_time_begin); $dt_winter_time_begin = new Element\Text('dt_winter_time_begin'); $dt_winter_time_begin->setLabel('Winter Time Begin')->setAttributes(array('type' => 'datetime', 'id' => 'dt_winter_time_begin', 'class' => 'form-control input-sm'))->setOptions(array('datepickerOptions' => array('autoSize: true'))); $this->add($dt_winter_time_begin); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm')); $this->add($comment); $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('objetosform'); $this->setAttribute('method', 'post'); $this->setAttribute('role', 'form'); $this->setAttributes(array('id' => 'objetosform')); $objetos_actividad_id = new Element('objetos_actividad_id'); $objetos_actividad_id->setLabel('Actividad'); $objetos_actividad_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'objetos_actividad_id', 'readonly' => 'readonly', 'class' => 'form-control')); $objetos_id = new Element('objetos_id'); $objetos_id->setLabel('ID'); $objetos_id->setAttributes(array('type' => 'text', 'placeholder' => 'Este campo se genera automáticamente', 'id' => 'objetos_id', 'readonly' => 'readonly', 'class' => 'form-control')); $objetos_nombre = new Element('objetos_nombre'); $objetos_nombre->setLabel('Nombre'); $objetos_nombre->setAttributes(array('type' => 'text', 'placeholder' => 'ej: wKER001', 'id' => 'objetos_nombre', 'class' => 'form-control')); $objetos_tipo = new Element\Select('objetos_tipo'); $objetos_tipo->setLabel('Tipo'); $objetos_tipo->setEmptyOption('Elige un Tipo..'); $objetos_tipo->setOptions(array('disable_inarray_validator' => true)); $objetos_tipo->setAttributes(array('id' => 'objetos_tipo', 'class' => "form-control")); $guardar = new Element\Button('guardar'); $guardar->setAttributes(array('class' => 'btn btn-success mr5', 'type' => 'submit', 'id' => 'guardar')); $guardar->setOptions(array('label' => '<i class="glyphicon glyphicon-floppy-disk"></i>', 'label_options' => array('disable_html_escape' => true))); $etiquetas_id = new Element\Hidden('etiquetas_id'); $etiquetas_id->setAttributes(array('id' => 'etiquetas_id')); $this->add($objetos_actividad_id); $this->add($objetos_id); $this->add($objetos_nombre); $this->add($objetos_tipo); $this->add($etiquetas_id); $this->add($guardar); }
/** * GeradorForm constructor. */ public function __construct() { parent::__construct(null); $this->setAttribute('method', 'POST'); $this->setInputFilter(new CriarControllerFilter()); //Input strForm $strForm = new Text('strForm'); $strForm->setLabel('strForm')->setAttributes(array('maxlength' => 100)); $this->add($strForm); //Input strController $strController = new Text('strController'); $strController->setLabel('strController')->setAttributes(array('maxlength' => 100)); $this->add($strController); //Input strRoute $strRoute = new Text('strRoute'); $strRoute->setLabel('strRoute')->setAttributes(array('maxlength' => 100)); $this->add($strRoute); //Input strService $strService = new Text('strService'); $strService->setLabel('strService')->setAttributes(array('maxlength' => 100)); $this->add($strService); //Input strEntity $strEntity = new Text('strEntity'); $strEntity->setLabel('strEntity')->setAttributes(array('maxlength' => 100)); $this->add($strEntity); //Botao submit $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn')); $this->add($button); }
public function __construct($name, AuthenticationOptionsInterface $options) { $this->setAuthenticationOptions($options); parent::__construct($name); $this->add(array('name' => 'identity', 'options' => array('label' => 'Adresse e-mail'), 'attributes' => array('type' => 'text', 'class' => 'form-control input-lg', 'placeholder' => 'Adresse e-mail ou code client', 'data-validation-engine' => 'validate[required]'))); $emailElement = $this->get('identity'); $label = $emailElement->getLabel('label'); // @TODO: make translation-friendly foreach ($this->getAuthenticationOptions()->getAuthIdentityFields() as $mode) { //$label = (!empty($label) ? $label . ' or ' : '') . ucfirst($mode); $label = (!empty($label) ? $label . ' ou ' : '') . 'code client'; } $emailElement->setLabel($label); // $this->add(array('name' => 'credential', 'options' => array('label' => 'Mot de passe'), 'attributes' => array('type' => 'password', 'class' => 'form-control input-lg', 'placeholder' => 'Mot de passe', 'data-validation-engine' => 'validate[required]'))); // @todo: Fix this // 1) getValidator() is a protected method // 2) i don't believe the login form is actually being validated by the login action // (but keep in mind we don't want to show invalid code vs invalid password or // anything like that, it should just say "login failed" without any additional info) //$csrf = new Element\Csrf('csrf'); //$csrf->getValidator()->setTimeout($options->getLoginFormTimeout()); //$this->add($csrf); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Connexion')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-primary btn-lg btn-block')); $this->add($submitElement, array('priority' => -100)); $this->getEventManager()->trigger('init', $this); }
function __invoke($name, $value, $label, array $attributes = null) { $attributes = $this->setDefaultAttributes($attributes); $element = new Button($name); $element->setValue($value)->setAttributes($attributes)->setLabel($label); return $this->render($element); }
public function __construct($name = null, array $comissoes = null) { parent::__construct($name); $this->comissoes = $comissoes; $this->setInputFilter(new MembroFilter()); $this->setAttribute('method', 'POST'); $id = new Hidden('id'); $this->add($id); $comissao = new Select(); $comissao->setLabel("Comissão ")->setName("comissao")->setOptions(array('value_options' => $this->comissoes)); $this->add($comissao); $membro = new Textarea('membro'); $membro->setLabel('Membros')->setAttribute('placeholder', 'Entre com os membros')->setAttribute('cols', '60')->setAttribute('rows', '5')->setAttribute('autofocus', 'autofocus'); $this->add($membro); $cargo = new Textarea('cargo'); $cargo->setLabel('Cargos')->setAttribute('placeholder', 'Entre com os cargos')->setAttribute('cols', '60')->setAttribute('rows', '5'); $this->add($cargo); $dataInicio = new Text('data_inicio'); $dataInicio->setLabel('Data Inicio'); $this->add($dataInicio); $dataFim = new Text('data_fim'); $dataFim->setLabel('Data Fim'); $this->add($dataFim); $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success')); $this->add($button); }
public function __construct(ObjectManager $objectManager) { $this->setObjectManager($objectManager); parent::__construct(null); $this->setAttributes(array('method' => 'POST', 'accept-charset' => 'UTF-8', 'class' => 'form-horizontal')); //input Titulo $titulo = new Text('titulo'); $titulo->setLabel('Titulo')->setAttributes(array('id' => 'nome', 'maxlength' => 80, 'class' => 'form-control')); $this->add($titulo); //input descri��o $descricao = new Textarea('descricao'); $descricao->setLabel("Descricao")->setAttributes(array('id' => 'descricao', 'maxlength' => 150, 'class' => 'form-control')); $this->add($descricao); //input texto $texto = new Textarea('texto'); $texto->setLabel('Texto')->setAttributes(array('id' => 'texto', 'class' => 'form-control')); $this->add($texto); //input Ativo $ativo = new Checkbox('ativo'); $ativo->setLabel('Ativo')->setLabelAttributes(array('class' => 'checkbox-inline'))->setOptions(array('use_hidden_element' => true)); $this->add($ativo); //Categoria $categoria = new ObjectSelect('category'); $categoria->setLabel('Categoria')->setOptions(array('object_manager' => $this->getObjectManager(), 'target_class' => 'Categoria\\Entity\\Category', 'property' => 'nome', 'empty_option' => '--Selecione--', 'is_method' => true, 'find_method' => array('name' => 'findBy', 'params' => array('criteria' => array(), 'orderBy' => array('nome' => 'ASC')))))->setAttributes(array('id' => 'category', 'class' => 'form-control')); $this->add($categoria); //botao submit $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-default')); $this->add($button); $this->setInputFilter(new PostFilter($categoria->getValueOptions())); }
public function __construct($name = null, AuthenticationOptionsInterface $options) { $this->setAuthenticationOptions($options); parent::__construct($name); $this->add(array('name' => 'identity', 'options' => array('label' => ''), 'attributes' => array('type' => 'text'))); $emailElement = $this->get('identity'); $label = $emailElement->getLabel('label'); // @TODO: make translation-friendly foreach ($this->getAuthenticationOptions()->getAuthIdentityFields() as $mode) { $label = (!empty($label) ? $label . ' or ' : '') . ucfirst($mode); } $emailElement->setLabel($label); // $this->add(array('name' => 'credential', 'options' => array('label' => 'Password'), 'attributes' => array('type' => 'password'))); // @todo: Fix this // 1) getValidator() is a protected method // 2) i don't believe the login form is actually being validated by the login action // (but keep in mind we don't want to show invalid username vs invalid password or // anything like that, it should just say "login failed" without any additional info) //$csrf = new Element\Csrf('csrf'); //$csrf->getValidator()->setTimeout($options->getLoginFormTimeout()); //$this->add($csrf); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Sign In')->setAttributes(array('type' => 'submit')); $this->add($submitElement, array('priority' => -100)); $this->getEventManager()->trigger('init', $this); }
public function __construct() { // we want to ignore the name passed parent::__construct('communication'); $this->add(new Element\Hidden('id_party')); $this->add(new Element\Hidden('nid_commtype')); $this->add(new Element\Hidden('access_detail')); $this->add(new Element\Hidden('access_form')); $this->setAttribute('method', 'post'); $this->get('access_detail')->setLabel('Account / Number'); $num_primary_order = new Element\Text('num_primary_order'); $num_primary_order->setLabel('Number Primary Order')->setAttributes(array('class' => 'form-control input-sm')); $this->add($num_primary_order); $id_address = new Element\Select('id_address'); $id_address->setLabel('Address')->setAttributes(array('class' => 'form-control input-sm'))->setValueOptions(array('' => 'No Address Binded')); $this->add($id_address); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm')); $this->add($comment); $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() { parent::__construct('personorg'); $this->setAttribute('method', 'post'); $this->add(new Element\Hidden('id_person')); $this->add(new Element\Hidden('id_organization')); $this->add(new Element\Hidden('bool_primary')); $this->add(new Element\Hidden('nid_lov_personorgtype')); $this->add(new Element\Hidden('dt_begin')); $name_title = new Element\Text('name_title'); $name_title->setLabel('Title')->setAttributes(array('class' => 'largewhite')); $this->add($name_title); $pnum_primary_order = new Element\Select('num_primary_order'); $pnum_primary_order->setLabel('Primary Order')->setAttributes(array('class' => 'tinywhite')); $this->add($pnum_primary_order); $dt_end = new Element\Date('dt_end'); $dt_end->setLabel('End Date')->setAttributes(array('class' => 'smallwhite', 'type' => 'date', 'id' => 'dt_end'))->setOptions(array('datepickerOptions' => array('changeYear: true', 'changeMonth: true', 'yearRange: "c-100:c+100"'))); $this->add($dt_end); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'smallwhite')); $this->add($comment); $back = new Element\Button('back'); $back->setLabel('Back')->setAttributes(array('id' => 'backbutton', 'class' => 'btn-success', 'style' => 'margin-right:70px;', 'onclick' => '')); $this->add($back); $submit = new Element\Submit('submit'); $submit->setValue('Login')->setAttributes(array('id' => 'submitbutton', 'class' => 'btn-success', 'style' => 'margin: 10px 0 10px 140px')); $this->add($submit); }
public function __construct($name = null, array $pais = null) { parent::__construct($name); $this->pais = $pais; $this->setAttribute('method', 'POST'); $id = new \Zend\Form\Element\Hidden('id'); $this->add($id); $nome = new Text('nome'); $nome->setLabel('Nome')->setAttribute('placeholder', 'Entre com a nome')->setAttribute('maxlength', 100)->setAttribute('size', 50)->setAttribute('autofocus', 'autofocus'); $this->add($nome); $email = new Text('email'); $email->setLabel('E-mail')->setAttribute('placeholder', 'Entre com o email')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($email); $celular = new Text('celular'); $celular->setLabel('Telefone')->setAttribute('placeholder', 'Entre com o telefone')->setAttribute('maxlength', 15); $this->add($celular); $ativo = new Checkbox('ativo'); $ativo->setLabel('Ativo : '); $this->add($ativo); $pai = new Select(); $pai->setLabel("Pai ")->setName("pessoa")->setOptions(array('value_options' => $pais)); $this->add($pai); $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success')); $this->add($button); }
public function __construct($name = null) { parent::__construct('datbaseform'); $this->setAttribute('class', 'p-t-15'); $this->setAttributes(array('id' => 'form-datos-bd', 'class' => 'form-horizontal')); $servidorBd = new Element('servidorBd'); $servidorBd->setLabel('Servidor de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $servidorBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. localhost', 'id' => 'servidorBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno", 'data-rule-minlength' => "6", 'data-msg-minlength' => "Debe tener al menos 6 caracteres")); $nombreBd = new Element('nombreBd'); $nombreBd->setLabel('Nombre de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label required')); $nombreBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. tributum-produccion', 'id' => 'nombreBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno")); $prefijoTablasBd = new Element('prefijoTablasBd'); $prefijoTablasBd->setLabel('Prefijo de tablas de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $prefijoTablasBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. trb-', 'id' => 'prefijoTablasBd', 'class' => 'form-control')); $nombreUsuarioBd = new Element('nombreUsuarioBd'); $nombreUsuarioBd->setLabel('Nombre de usuario de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $nombreUsuarioBd->setAttributes(array('type' => 'text', 'placeholder' => 'ej. root', 'id' => 'nombreUsuarioBd', 'class' => 'form-control', 'data-rule-required' => "true", 'data-msg-required' => "Este campo debe estar lleno")); $contrasenaDb = new Element\Password('contrasenaDb'); $contrasenaDb->setLabel('Contraseña de la base de datos:')->setLabelAttributes(array('class' => 'col-sm-3 control-label')); $contrasenaDb->setAttributes(array('placeholder' => 'Por seguridad este campo es necesario', 'id' => 'contrasenaDb', 'class' => 'form-control')); $buttonContinuar = new Element\Button('buttonContinuar'); $buttonContinuar->setLabel('Continuar'); $buttonContinuar->setAttributes(array('class' => 'btn btn-success', 'type' => 'submit', 'id' => 'buttonContinuar')); $buttonLimpiar = new Element\Button('buttonLimpiar'); $buttonLimpiar->setLabel('<i class="pg-close"></i> Limpiar')->setLabelOptions(array('disable_html_escape' => true)); $buttonLimpiar->setAttributes(array('class' => 'btn btn-default', 'id' => 'buttonLimpiar', 'type' => 'reset')); $this->add($servidorBd); $this->add($nombreBd); $this->add($prefijoTablasBd); $this->add($nombreUsuarioBd); $this->add($contrasenaDb); $this->add($buttonContinuar); $this->add($buttonLimpiar); }
public function __construct() { // we want to ignore the name passed parent::__construct('orgtype'); $this->setAttribute('method', 'post'); $type_organization = new Element\Text('type_organization'); $type_organization->setLabel('Organization Type')->setAttributes(array('class' => 'form-control input-sm')); $this->add($type_organization); $genre = new Element\Text('genre'); $genre->setLabel('Genre')->setAttributes(array('class' => 'form-control input-sm')); $this->add($genre); $bool_unioned = new Element\Radio('bool_unioned'); $bool_unioned->setLabel('Unioned ?')->setLabelAttributes(array('class' => 'radio-inline'))->setValueOptions(array('1' => 'Yes', '0' => 'No')); $this->add($bool_unioned); $registered_location = new Element\Text('registered_location'); $registered_location->setLabel('Registered Location')->setAttributes(array('class' => 'form-control input-sm')); $this->add($registered_location); $comment = new Element\Textarea('comment'); $comment->setLabel('Comment')->setAttributes(array('class' => 'form-control input-sm')); $this->add($comment); $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() { parent::__construct(); $this->add(['type' => 'text', 'name' => 'errand_search', 'options' => []]); $this->add(array('type' => 'Zend\\Form\\Element\\Select', 'name' => 'search_city', 'attributes' => ['options' => ['Select City' => 'Select City'], 'class' => 'form-control'])); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Submit')->setAttributes(array('type' => 'submit')); }
public function __construct($name = null, array $classificacoes = null) { parent::__construct($name); $this->classificacoes = $classificacoes; $this->setInputFilter(new PessoaFilter()); $this->setAttribute('method', 'POST'); $this->setAttribute('enctype', 'multipart/form-data'); $id = new \Zend\Form\Element\Hidden('id'); $this->add($id); $titulo = new Text('nome'); $titulo->setLabel('Nome : ')->setAttribute('placeholder', 'Entre com o nome')->setAttribute('maxlength', 100)->setAttribute('size', 50)->setAttribute('autofocus', 'autofocus'); $this->add($titulo); $classificacao = new Select(); $classificacao->setLabel("Classificacao ")->setName("classification")->setOptions(array('value_options' => $classificacoes)); $this->add($classificacao); $dataAdmissao = new Text('data_admissao'); $dataAdmissao->setLabel('Data Admissão'); $this->add($dataAdmissao); $enderecoResidencial = new Text('endereco_residencial'); $enderecoResidencial->setLabel('End. Residencial:')->setAttribute('placeholder', 'Entre com o endereço residencial')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($enderecoResidencial); $telefoneResidencial = new Text('telefone_residencial'); $telefoneResidencial->setLabel('Tel. Residencial'); $this->add($telefoneResidencial); $celular = new Text('celular'); $celular->setLabel('Celular'); $this->add($celular); $emailPessoal = new Text('email_pessoal'); $emailPessoal->setLabel('Email Pessoal'); $this->add($emailPessoal); $enderecoComercial = new Text('endereco_comercial'); $enderecoComercial->setLabel('End. Comercial:')->setAttribute('placeholder', 'Entre com o endereço comercial')->setAttribute('maxlength', 255)->setAttribute('size', 50); $this->add($enderecoComercial); $telefoneComercial = new Text('telefone_comercial'); $telefoneComercial->setLabel('Tel. Comercial'); $this->add($telefoneComercial); $emailComercial = new Text('email_comercial'); $emailComercial->setLabel('Email Comercial'); $this->add($emailComercial); $conjuge = new Text('conjuge'); $conjuge->setLabel('Nome do Conjuge')->setAttribute('maxlength', 100)->setAttribute('size', 50); $this->add($conjuge); $celularConjuge = new Text('celular_conjuge'); $celularConjuge->setLabel('Celular do Conjuge'); $this->add($celularConjuge); /*===========================================================================================*/ $fotografia = new File('fotografia'); $fotografia->setLabel('Fotografia')->setAttribute('id', 'fotografia'); $this->add($fotografia); /*===========================================================================================*/ $ativo = new Checkbox('ativo'); $ativo->setLabel('Ativo : '); $this->add($ativo); $button = new Button('submit'); $button->setLabel('Salvar')->setAttributes(array('type' => 'submit', 'class' => 'btn btn-success')); $this->add($button); }
/** * {@inheritDoc} */ public function __construct($name = null) { parent::__construct($name); $this->add(['name' => 'email', 'options' => ['label' => 'Email']]); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Request new password')->setAttributes(['type' => 'submit']); $this->add($submitElement, ['priority' => -100]); $this->getEventManager()->trigger('init', $this); }
public function __construct(EntityManager $em) { parent::__construct(); $this->em = $em; $this->add(['name' => 'id', 'attributes' => ['type' => 'hidden']])->add(['name' => 'name', 'options' => ['label' => 'Role Name'], 'attributes' => ['type' => 'text', 'placeholder' => 'Role Name', 'class' => 'form-control', 'id' => 'name', 'autofocus' => 'autofocus']])->add(['type' => 'DoctrineModule\\Form\\Element\\ObjectSelect', 'name' => 'parent', 'options' => ['label' => 'Parent Role', 'object_manager' => $this->em, 'target_class' => 'ZfMuscle\\Entity\\Role', 'property' => 'roleId', 'empty_option' => '--Select--', 'is_method' => true, 'find_method' => ['name' => 'getRoles']], 'attributes' => ['class' => 'full-width', 'data-placeholder' => 'Select Parent Role', 'data-init-plugin' => 'select2', 'id' => 'parent']]); $submitElement = new Element\Button('submit'); $submitElement->setName('submit')->setLabel('Save Role')->setAttributes(['type' => 'submit', 'class' => 'btn btn-primary btn-cons m-t-10', 'id' => 'addrole']); $this->add($submitElement, ['priority' => -100]); }
public function __construct($name = null, ForgotOptionsInterface $options) { $this->setForgotOptions($options); parent::__construct($name); $this->add(array('name' => 'email', 'options' => array('label' => 'Email'))); $submitElement = new Element\Button('submit'); $submitElement->setLabel('Request new password')->setAttributes(array('type' => 'submit')); $this->add($submitElement, array('priority' => -100)); $this->getEventManager()->trigger('init', $this); }