当前位置: 首页>>代码示例>>PHP>>正文


PHP Button::setLabel方法代码示例

本文整理汇总了PHP中Zend\Form\Element\Button::setLabel方法的典型用法代码示例。如果您正苦于以下问题:PHP Button::setLabel方法的具体用法?PHP Button::setLabel怎么用?PHP Button::setLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zend\Form\Element\Button的用法示例。


在下文中一共展示了Button::setLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __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);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:30,代码来源:TimezoneForm.php

示例2: __construct

 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);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:26,代码来源:CommunicationEditForm.php

示例3: __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);
 }
开发者ID:diego-mi,项目名称:skeleton-gen,代码行数:33,代码来源:CriarControllerForm.php

示例4: __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);
 }
开发者ID:diego-mi,项目名称:financeiro,代码行数:29,代码来源:CriarFormForm.php

示例5: __construct

 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);
 }
开发者ID:souzagabi,项目名称:Agenda,代码行数:27,代码来源:MembroForm.php

示例6: __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'));
     $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);
 }
开发者ID:Abianic,项目名称:CoreApp,代码行数:34,代码来源:ConfiguracionDbForm.php

示例7: __construct

 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);
 }
开发者ID:souzagabi,项目名称:Agenda,代码行数:26,代码来源:FilhoForm.php

示例8: __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()));
 }
开发者ID:eltondias,项目名称:vibe,代码行数:30,代码来源:PostForm.php

示例9: __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);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:30,代码来源:RespForm.php

示例10: __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);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:25,代码来源:LovChangeTypeForm.php

示例11: __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
     $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()));
 }
开发者ID:juizmill,项目名称:ZF2-Test-Authentication,代码行数:31,代码来源:PostForm.php

示例12: __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);
 }
开发者ID:Abianic,项目名称:CoreApp,代码行数:30,代码来源:CreaEsquemaForm.php

示例13: __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);
 }
开发者ID:Quicksilvers,项目名称:errand-project,代码行数:26,代码来源:Base.php

示例14: __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()));
 }
开发者ID:juizmill,项目名称:ZF2-Test-Authentication,代码行数:27,代码来源:UsuarioEditForm.php

示例15: __construct

 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);
 }
开发者ID:shiqizhang,项目名称:php-sample,代码行数:28,代码来源:PersonOrgForm.php


注:本文中的Zend\Form\Element\Button::setLabel方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。