本文整理汇总了PHP中Zend\Form\Element\Button类的典型用法代码示例。如果您正苦于以下问题:PHP Button类的具体用法?PHP Button怎么用?PHP Button使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Button类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
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);
}
示例2: __construct
/**
* 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);
}
示例3: __construct
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);
}
示例4: __construct
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);
}
示例5: __construct
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()));
}
示例6: __construct
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);
}
示例7: __construct
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);
}
示例8: __construct
/**
* 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()));
}
示例9: __construct
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);
}
示例10: __construct
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' => 'admin@tudominio.com', '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);
}
示例11: __construct
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);
}
示例12: __construct
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()));
}
示例13: __construct
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);
}
示例14: __construct
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);
}
示例15: __construct
/**
* 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);
}