/**
  * (non-PHPdoc)
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form-exportacao-arquivo');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/exportacao-arquivo/rps-consultar/'));
     $aMeses = DBSeller_Helper_Date_Date::getMesesArray();
     $aAnos = array(date('Y') - 0 => date('Y') - 0, date('Y') - 1 => date('Y') - 1, date('Y') - 2 => date('Y') - 2, date('Y') - 3 => date('Y') - 3, date('Y') - 4 => date('Y') - 4);
     $oElm = $this->createElement('select', 'mes_competencia', array('divspan' => '4', 'multiOptions' => $aMeses));
     $oElm->setLabel('Mês:');
     $oElm->setAttrib('class', 'span2');
     $oElm->setValue(date('m'));
     $this->addElement($oElm);
     $oElm = $this->createElement('select', 'ano_competencia', array('divspan' => '6', 'multiOptions' => $aAnos));
     $oElm->setLabel('Ano:');
     $oElm->setAttrib('class', 'span2');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'numero_rps', array('divspan' => '10'));
     $oElm->setLabel('Número da NFS-e:');
     $oElm->setAttrib('class', 'span2');
     $this->addElement($oElm);
     $this->addElement('button', 'btn_consultar', array('divspan' => 4, 'label' => 'Consultar', 'class' => 'input-medium btn', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addElement('button', 'btn_exportar', array('divspan' => 6, 'label' => 'Exportar', 'class' => 'input-medium btn', 'disabled' => TRUE, 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_SUCCESS));
     $this->addDisplayGroup(array('mes_competencia', 'ano_competencia', 'numero_rps', 'btn_consultar', 'btn_exportar'), 'dados_consulta', array('legend' => 'Parâmetros'));
     return $this;
 }
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formListarContas');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/fiscal/conta-abrasf/listar-contas'));
     $oElm = $this->createElement('text', 'conta_abrasf', array('divspan' => '5'));
     $oElm->setLabel('Conta Abrasf:');
     $oElm->setAttrib('placeholder', 'Número da conta');
     $oElm->setAttrib('class', 'span2');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('select', 'tributavel', array('divspan' => '5'));
     $oElm->setLabel('Tributável:');
     $oElm->setAttrib('placeholder', 'Selecione');
     $oElm->setAttrib('class', 'span2');
     $oElm->addMultiOptions(array(NULL => 'Todos', 't' => 'Sim', 'f' => 'Não'));
     $oElm->setValue(NULL);
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('select', 'obrigatorio', array('divspan' => '10'));
     $oElm->setLabel('Obrigatório:');
     $oElm->setAttrib('placeholder', 'Selecione');
     $oElm->setAttrib('class', 'span2');
     $oElm->addMultiOptions(array(NULL => 'Todos', 't' => 'Sim', 'f' => 'Não'));
     $oElm->setValue(NULL);
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $this->addElement('button', 'btn_consultar', array('divspan' => 2, 'label' => 'Consultar', 'class' => 'input-medium', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addDisplayGroup(array('conta_abrasf', 'tributavel', 'obrigatorio', 'btn_consultar'), 'dados_contas', array('legend' => 'Consulta'));
     return $this;
 }
 /**
  * Construtor da classe
  *
  * @see Twitter_Bootstrap_Form_Vertical
  * @return Auth_form_login_FormLogin|void
  */
 public function init()
 {
     $oTradutor = $this->getTranslator();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form_login')->setAction($oBaseUrlHelper->baseUrl('/auth/login/post'));
     $oElm = $this->createElement('text', 'login');
     $oElm->setLabel('Login');
     $oElm->setAttrib('class', 'span3');
     $oElm->setAttrib('autofocus', 'autofocus');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('password', 'senha');
     $oElm->setLabel('Senha');
     $oElm->setAttrib('class', 'span3');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $iTotalErros = 0;
     if ($oSessao = new Zend_Session_Namespace('captcha')) {
         $iTotalErros = $oSessao->errors;
     }
     if ($iTotalErros > 0) {
         $oKeysRecaptcha = Zend_Registry::get('config')->recaptcha;
         if (!empty($oKeysRecaptcha->publicKey) && !empty($oKeysRecaptcha->privateKey)) {
             $oRecaptcha = new Zend_Service_ReCaptcha($oKeysRecaptcha->publicKey, $oKeysRecaptcha->privateKey);
             $oRecaptcha->setOption('theme', 'clean');
             $oCaptcha = new Zend_Form_Element_Captcha('challenge', array('captcha' => 'ReCaptcha', 'captchaOptions' => array('captcha' => 'ReCaptcha', 'service' => $oRecaptcha)));
             $oCaptcha->setLabel('Informe as palavras abaixo:');
             $this->addElement($oCaptcha);
         } else {
             $oSessao->errors = 0;
         }
     }
     $this->addElement('submit', 'submit', array('label' => 'Entrar', 'class' => 'pull-right', 'data-loading-text' => $oTradutor->_('Aguarde...'), 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY));
     return $this;
 }
 /**
  * Construtor da classe
  *
  * @return $this|void
  */
 public function init()
 {
     $oTradutor = $this->getTranslator();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form_autenticacao')->setAction($oBaseUrlHelper->baseUrl('/auth/nfse/autenticar-post'));
     $oElm = $this->createElement('text', 'prestador_cnpjcpf');
     $oElm->setLabel('CPF / CNPJ Prestador');
     $oElm->setAttrib('class', 'span3 mask-cpf-cnpj');
     $oElm->setAttrib('autofocus', 'autofocus');
     $oElm->addFilter(new Zend_Filter_Digits());
     $oElm->addValidator(new DBSeller_Validator_CpfCnpj());
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'numero_rps');
     $oElm->setLabel('Número do RPS');
     $oElm->setAttrib('class', 'span3 mask-numero');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'codigo_verificacao');
     $oElm->setLabel('Código de Verificação');
     $oElm->setAttrib('class', 'span3');
     $this->addElement($oElm);
     $this->addElement('submit', 'btn_verificar', array('label' => 'Verificar NFSe', 'class' => 'pull-right', 'data-loading-text' => $oTradutor->_('Aguarde...'), 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY));
     $this->addDisplayGroup(array('prestador_cnpjcpf', 'numero_rps', 'codigo_verificacao', 'btn_verificar'), 'verificacao_nfse', array('legend' => 'Verificação de NFSe'));
     return $this;
 }
 /**
  * Cria o formulario
  * 
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formCancelar');
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/nota/cancelar-post'));
     $oElm = $this->createElement('hidden', 'id');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'email');
     $oElm->setLabel('Email Tomador:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setAttrib('autofocus', 'autofocus');
     $oElm->setRequired(FALSE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('select', 'cancelamento_motivo', array('divspan' => '4'));
     $oElm->setLabel('Motivo:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->addMultiOptions(array('9' => 'Outros', '1' => 'Erro na emissão', '2' => 'Serviço não prestado', '3' => 'Duplicidade da nota'));
     $oElm->setValue('9');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('textarea', 'cancelamento_justificativa');
     $oElm->setLabel('Justificativa:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setAttrib('rows', '4');
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     return $this;
 }
 /**
  * Construtor
  *
  * @return $this|void
  */
 public function init()
 {
     parent::init();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/dms/emissao-manual-entrada-salvar'));
     // Atributos utilizadas no JS, para manter o controle de URL no lado server
     $this->setAttrib('sUrlCalculaValoresDms', $oBaseUrlHelper->baseUrl('/contribuinte/dms/emissao-manual-calcula-valores-dms'));
     $this->setAttrib('sUrlVerificaDocumento', $oBaseUrlHelper->baseUrl('/contribuinte/dms/emissao-manual-entrada-verificar-documento'));
     if (isset($this->s_cpf_cnpj)) {
         $this->getElement('s_cpf_cnpj')->setLabel('CPF / CNPJ:');
         $this->getElement('s_cpf_cnpj')->setAttrib('class', 'span2 mask-cpf-cnpj');
         $this->getElement('s_cpf_cnpj')->setRequired(TRUE);
     }
     if (isset($this->s_razao_social)) {
         $this->getElement('s_razao_social')->setRequired(TRUE);
     }
     // Remove o campo de inscricao municipal
     $this->removeElement('s_inscricao_municipal');
     $this->removeElement('s_servico_prestado');
     // Ajusta mascara para porcentagem
     $oElm = $this->getElement('s_aliquota');
     $oElm->setAttrib('class', $oElm->getAttrib('class') . ' mask-porcentagem');
     // Altera o texto do fieldset do prestador
     $oFieldsetDadosTomador = $this->getDisplayGroup('dados_tomador');
     $oFieldsetDadosTomador->setLegend('Dados do Prestador');
     // Carrega combo
     parent::setNaturezaOperacao();
     parent::setSituacaoDocumento();
     self::setTipoDocumento();
     return $this;
 }
예제 #7
0
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAttrib('id', 'form-acao');
     $this->setMethod('post');
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/acao/novo'));
     $oElm = $this->createElement('hidden', 'c');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'nome');
     $oElm->setLabel('Nome');
     $oElm->setRequired(TRUE);
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setAttrib('rows', '4');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'acaoacl');
     $oElm->setLabel('Ação ACL');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('textarea', 'sub_acoes');
     $oElm->setLabel('Sub Ações');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setAttrib('rows', '6');
     $this->addElement($oElm);
     $oElm = $this->createElement('checkbox', 'gerador_dados');
     $oElm->setLabel('Gerador Dados:');
     $oElm->setAttrib('style', 'width:95%');
     $this->addElement($oElm);
     return $this;
 }
 /**
  * Cria o formulario
  * 
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->addElement(new Twitter_Bootstrap_Form_Element_Button('nova', array('label' => 'Nova', 'type' => 'button', 'style' => 'min-width: 120px', 'url' => $oBaseUrlHelper->baseUrl('/contribuinte/nota/index/'), 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_INFO)));
     $this->addElement(new Twitter_Bootstrap_Form_Element_Button('imprimir', array('label' => 'Imprimir', 'type' => 'button', 'style' => 'min-width: 120px', 'url' => $oBaseUrlHelper->baseUrl("/contribuinte/nota/nota-impressa/codigo_verificacao/{$this->cod_verificacao}"), 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY)));
     $this->addDisplayGroup(array('imprimir', 'nova'), 'actions', array('disableLoadDefaultDecorators' => true, 'decorators' => array('Actions')));
     return $this;
 }
 /**
  * Método construtor
  *
  * @return $this|void
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl($this->sAction))->setMethod('post')->setAttrib('id', 'formTomador');
     $oElm = $this->createElement('text', 'base_dados');
     $oElm->setLabel('Base de Dados: ');
     $oElm->setRequired(TRUE);
     $oElm->setAttrib('class', 'span3');
     $oElm->setAttrib('autofocus', TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'servidor');
     $oElm->setLabel('Servidor: ');
     $oElm->setRequired(TRUE);
     $oElm->setAttrib('class', 'span3');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'porta');
     $oElm->setLabel('porta: ');
     $oElm->setAttrib('class', 'span1');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'usuario');
     $oElm->setLabel('Usuário: ');
     $oElm->setRequired(TRUE);
     $oElm->setAttrib('class', 'span3');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'senha');
     $oElm->setLabel('Senha: ');
     $oElm->setAttrib('class', 'span3');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'client_url');
     $oElm->setLabel('Cliente Url: ');
     $oElm->setRequired(TRUE);
     $oElm->setAttrib('class', 'span8');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'client_location');
     $oElm->setLabel('Cliente Location: ');
     $oElm->setAttrib('class', 'span8');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'client_uri');
     $oElm->setLabel('Cliente Uri: ');
     $oElm->setAttrib('class', 'span8');
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addElement('submit', 'submit', array('label' => 'Gerar Ambiente', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     $this->addDisplayGroup(array('base_dados', 'servidor', 'porta', 'usuario', 'senha'), 'db', array('legend' => 'Base de Dados'));
     $this->addDisplayGroup(array('client_url', 'client_location', 'client_uri'), 'url', array('legend' => 'WebService'));
     $this->addDisplayGroup(array('submit'), 'teste');
     return $this;
 }
예제 #10
0
 public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
 {
     $front = Zend_Controller_Front::getInstance();
     $bootstrap = $front->getParam("bootstrap");
     $local_config = $bootstrap->getOption('local_config');
     if (!file_exists($local_config) && $request->getModuleName() != 'install') {
         $baseUrl = new Zend_View_Helper_BaseUrl();
         $this->getResponse()->setRedirect($baseUrl->baseUrl('/install/'));
     }
 }
 public function init()
 {
     parent::init();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/rps/requisicao'));
     // Tipos de Nota do Grupo RPS
     $aTiposDocumento = Contribuinte_Model_Nota::getTiposNota(Contribuinte_Model_Nota::GRUPO_NOTA_RPS);
     // Popula o select com os tipos de nota
     if (is_object($this->tipo_documento) && is_array($aTiposDocumento)) {
         $this->tipo_documento->setMultiOptions($aTiposDocumento);
     }
     return $this;
 }
예제 #12
0
 protected function _resolveRoute($route)
 {
     if (is_array($route)) {
         $this->_validateRouteArray($route);
         $router = Zend_Controller_Front::getInstance()->getRouter();
         return $router->assemble($route[0], $route[1]);
     }
     if (!$this->_omitBaseUrl) {
         $baseUrlHelper = new Zend_View_Helper_BaseUrl();
         return $baseUrlHelper->baseUrl($route);
     }
     return $route;
 }
예제 #13
0
 public function init()
 {
     /* Initialize action controller here */
     // for URL
     $uri = new Zend_View_Helper_BaseUrl();
     define('URL_BASE', $uri->getBaseUrl() . "/");
     define('URL_MEDIA_COMPANY_PROFILE', URL_BASE . 'library/media/companyprofiles/');
     define('URL_MEDIA_PORTFOLIO', URL_BASE . 'library/media/portfolio/');
     define('URL_MEDIA_VIDEO', URL_BASE . 'library/media/video/');
     define('URL_MEDIA_PHOTO', URL_BASE . 'library/media/photo/');
     define('URL_THEMES', URL_BASE . "library/themes/standard/");
     //Mobile
     define('URL_THEMES_MOBILE', URL_BASE . "library/themes/mobile/");
     //End Mobile
     define('URL_MEDIA', URL_BASE . "library/media/");
     define('URL_MEDIA_PROFILE', URL_MEDIA . "profiles/");
     define('URL_MEDIA_TEMP', URL_MEDIA . "temp/");
     define('URL_MEDIA_SCHOOLLOGO', URL_MEDIA . "schoollogos/");
     //define('URL_MEDIA_PROFILE_NOAVATAR', "DefaultPerson.jpg");
     define('URL_MEDIA_PROFILE_NOAVATAR', "none.png");
     //define('LAYOUT', "");
     // for DIR
     define('DIR_BASE', realpath(APPLICATION_PATH . '/../'));
     define('DIR_MEDIA_COMPANY_PROFILE', DIR_BASE . '/library/media/companyprofiles/');
     define('DIR_MEDIA_PORTFOLIO', DIR_BASE . '/library/media/portfolio/');
     define('DIR_MEDIA_VIDEO', DIR_BASE . '/library/media/video/');
     define('DIR_MEDIA_PHOTO', DIR_BASE . '/library/media/photo/');
     define('DIR_MEDIA', DIR_BASE . '/library/media/');
     define('DIR_MEDIA_TEMP', DIR_MEDIA . 'temp/');
     define('LIMIT_PAGE_LEFT', 10);
     define('LIMIT_PAGE_NUMBER_LEFT', 3);
     define('USER_TYPE_COMPANY', 1);
     define('USER_TYPE_CANDIDATE', 2);
     //  $this->_client = PR_Session::getSession(PR_Session::SESSION_CLIENT);pii
     $this->_client = PR_Session::getSession(PR_Session::SESSION_USER);
     $this->view->loginclient = $this->_client;
     //$this->layout()-
     $this->_layout = $this->_helper->layout->getLayoutInstance();
     $this->_layout->loginclient = $this->_client;
     $this->_layout->logout = $this->_helper->url('do-logout', 'user');
     $this->_layout->_helper = $this->_helper;
     //for querystring
     $this->_request = $this->getRequest();
     $ajax = $this->_request->getParam('ajax', 0);
     $this->view->ajax = $ajax;
     if ($ajax == 1) {
         $this->_helper->layout->disableLayout();
     }
     $pageajax = $this->_request->getParam('pageajax', "");
     $this->view->pageajax = $pageajax;
 }
 /**
  * Construtor
  *
  * @return $this|void
  */
 public function init()
 {
     parent::init();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/dms/emissao-manual-saida-salvar'));
     // Remove elementos
     $this->removeElement('natureza_operacao');
     $this->removeElement('situacao_documento');
     $this->removeElement('tipo_documento');
     $this->removeElement('s_imposto_retido');
     $this->removeElement('s_data');
     // Adiciona elementos
     $oElm = $this->createElement('hidden', 'natureza_operacao');
     $oElm->setValue(1);
     // Somente "dentro do município"
     $this->addElement($oElm);
     $oElm = $this->createElement('hidden', 's_imposto_retido');
     $oElm->setValue(0);
     $this->addElement($oElm);
     $oElm = $this->createElement('hidden', 'situacao_documento');
     $oElm->setValue('N');
     // Somente "normal"
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'tipo_documento_descricao', array('divspan' => '10'));
     $oElm->setLabel('Tipo de Documento:');
     $oElm->setAttrib('class', 'span5');
     $oElm->setOrder(3);
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oGrupo = $this->getDisplayGroup('dados_declarante');
     $oGrupo->addElement($oElm);
     // Ajuste layout
     $oElm = $this->createElement('text', 's_data', array('divspan' => '8'));
     $oElm->setLabel('Data:');
     $oElm->setAttrib('class', 'span2 mask-data');
     $oElm->setOrder(0);
     $oElm->setRequired(TRUE);
     $oElm->addValidator(new Zend_Validate_Date(array('locale' => 'pt-Br')));
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oGrupo = $this->getDisplayGroup('dados_servico');
     $oGrupo->addElement($oElm);
     // Outros ajustes
     $oElm = $this->getElement('s_servico_prestado');
     $oElm->setAttrib('data-url', $oBaseUrlHelper->getBaseUrl('/contribuinte/dms/emissao-manual-buscar-dados-servico/'));
     $oElm->setAttrib('class', 'span7');
     self::setServico();
     return $this;
 }
 /**
  * Construtor da classe
  *
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form_parametros_prefeitura_nfse');
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/parametro/prefeitura-salvar-nfse'));
     $oElm = $this->createElement('select', 'modelo_importacao_rps');
     $oElm->setLabel('Modelo de Importação de RPS:');
     $oElm->setAttrib('class', 'span3');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     // Carrega os modelos de impressao
     self::setModelosImportacaoRps($oElm);
     $oElm = $this->createElement('select', 'modelo_impressao_nfse');
     $oElm->setLabel('Modelo de Impressão:');
     $oElm->setAttrib('class', 'span3');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     // Carrega os modelos de impressao
     self::setModelosImpressao($oElm);
     $oElm = $this->createElement('textarea', 'informacoes_complementares_nfse');
     $oElm->setLabel('Informações Complementares da Nota:');
     $oElm->setAttrib('class', 'span6 exibir-contador-maxlength');
     $oElm->setAttrib('rows', 4);
     $oElm->setAttrib('maxlength', 600);
     $oElm->removeDecorator('errors');
     $oElm->setValidators(array(new Zend_Validate_StringLength(array('max' => 600))));
     // TODO Ver tamanho no PDF
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'secretaria');
     $oElm->setLabel('Secretaria:');
     $oElm->setAttrib('class', 'span6');
     $oElm->setAttrib('maxlength', 100);
     $oElm->removeDecorator('errors');
     $oElm->setValidators(array(new Zend_Validate_StringLength(array('max' => 100))));
     // TODO Ver tamanho no PDF
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'setor');
     $oElm->setLabel('Setor:');
     $oElm->setAttrib('class', 'span6');
     $oElm->setAttrib('maxlength', 100);
     $oElm->removeDecorator('errors');
     $oElm->setValidators(array(new Zend_Validate_StringLength(array('max' => 100))));
     // TODO Ver tamanho no PDF
     $this->addElement($oElm);
     $this->addElement('submit', 'btn_salvar_nfse', array('label' => 'Salvar', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     $this->btn_salvar_nfse->setDecorators(array('ViewHelper'));
     return $this;
 }
 /**
  * Construtor
  *
  * @return $this
  */
 public function init()
 {
     parent::init();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/dms/emissao-manual-saida-salvar'));
     // Altera o texto do elemento
     $this->getElement('s_imposto_retido')->setLabel('Subst. Tributário:');
     // Bloqueia edicao do campo de aliquota
     $this->getElement('s_aliquota')->setAttrib('readonly', TRUE);
     // Carrega combos
     parent::setNaturezaOperacao();
     parent::setSituacaoDocumento();
     parent::setTipoDocumento();
     parent::setServico();
     return $this;
 }
 /**
  * Cria Formulário
  *
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formConsulta');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/protocolo/consulta-processar'));
     /**
      * Consulta usuários ativos
      */
     $aUsuarios = Administrativo_Model_Usuario::getByAttributes(array('habilitado' => true, 'tipo' => array(1, 2)), array('nome' => 'ASC'));
     $aListaUsuarios = array('' => 'Selecione');
     foreach ($aUsuarios as $oUsuario) {
         $aListaUsuarios[$oUsuario->getId()] = trim(DBSeller_Helper_String_Format::wordsCap($oUsuario->getNome()));
     }
     $oElm = $this->createElement('select', 'usuario', array('multiOptions' => $aListaUsuarios, 'divspan' => '10'));
     $oElm->setLabel('Usuário/Contribuinte:');
     $oElm->setAttrib('class', 'input-xlarge span4');
     $oElm->setValue(NULL);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'data_processamento_inicial', array('divspan' => '5'));
     $oElm->setLabel('Data Inicial:');
     $oElm->setAttrib('class', 'span2');
     $oElm->addValidator(new Zend_Validate_Date(array('locale' => 'pt-Br')));
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'data_processamento_final', array('divspan' => '5'));
     $oElm->setLabel('Data Final:');
     $oElm->setAttrib('class', 'span2');
     $oElm->addValidator(new Zend_Validate_Date(array('locale' => 'pt-Br')));
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('select', 'ordenacao', array('divspan' => '5'));
     $oElm->setLabel('Ordenação:');
     $oElm->setAttrib('class', 'span2');
     $oElm->addMultiOptions(array('asc' => 'Crescente', 'desc' => 'Decrescente'));
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'protocolo', array('divspan' => '5'));
     $oElm->setLabel('Número do Protocolo:');
     $oElm->setAttrib('class', 'span2');
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addElement('submit', 'btn_consultar', array('divspan' => 2, 'label' => 'Consultar', 'class' => 'input-medium', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addDisplayGroup(array('usuario', 'data_processamento_inicial', 'data_processamento_final', 'ordenacao', 'protocolo', 'btn_consultar'), 'dados_consulta', array('legend' => 'Parâmetros'));
     return $this;
 }
 public function init()
 {
     $oTradutor = $this->getTranslator();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formLiberacaoUsuario');
     $this->setAction($oBaseUrlHelper->baseUrl('/default/cadastro-eventual/confirmar'));
     $this->setMethod('post');
     $oElm = $this->createElement('text', 'hash', array('divspan' => 9));
     $oElm->setLabel('Código Verificação:');
     $oElm->setAttrib('class', 'span7');
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'cnpjcpf', array('divspan' => 9));
     $oElm->setLabel('CPF / CNPJ:');
     $oElm->setAttrib('class', 'span3 mask-cpf-cnpj');
     $oElm->setAttrib('maxlength', 18);
     $oElm->addValidator(new DBSeller_Validator_CpfCnpj());
     $oElm->addFilter(new Zend_Filter_Digits());
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oValidaTamanhoCampo = new Zend_Validate_StringLength();
     $oValidaTamanhoCampo->setMin('6');
     $sMensagemValidacao = $oTradutor->_(sprintf('Os campos "<b>Senha</b>" e "<b>Confirme a Senha</b>" devem possuir no mínimo %s caracteres.', $oValidaTamanhoCampo->getMin()));
     $oElm = $this->createElement('password', 'senha', array('divspan' => 9));
     $oElm->setLabel('Senha:');
     $oElm->setAttrib('minlength', $oValidaTamanhoCampo->getMin());
     $oElm->addValidator(new Zend_Validate_Identical('senharepetida'));
     $oElm->setAttrib('message-error', $sMensagemValidacao);
     $oElm->setAttrib('class', 'span3');
     $oElm->setRequired(TRUE);
     $oElm->addValidator($oValidaTamanhoCampo);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('password', 'senharepetida', array('divspan' => 10));
     $oElm->setLabel('Confirme a Senha:');
     $oElm->setAttrib('class', 'span3');
     $oElm->setAttrib('minlength', $oValidaTamanhoCampo->getMin());
     $oElm->addValidator(new Zend_Validate_Identical('senha'));
     $oElm->addValidator($oValidaTamanhoCampo);
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addDisplayGroup(array('hash', 'cnpjcpf', 'senha', 'senharepetida'), 'dados_liberacao', array('legend' => 'Confirme seu Cadastro'));
     $this->addElement('submit', 'confirmar', array('label' => 'Confirmar', 'style' => 'margin-left:30px', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY));
 }
 public function init()
 {
     parent::init();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/dms/requisicao'));
     // Tipos de Nota do Grupo DMS
     $aTiposDocumento = Contribuinte_Model_Nota::getTiposNota(Contribuinte_Model_Nota::GRUPO_NOTA_DMS);
     // Popula o select com os tipos de nota
     if (is_object($this->tipo_documento) && is_array($aTiposDocumento)) {
         $this->tipo_documento->setMultiOptions($aTiposDocumento);
     }
     // Alterando a descrição do label
     if (is_object($this->quantidade)) {
         $this->quantidade->setLabel('Quantidade de NF');
     }
     return $this;
 }
 /**
  * Cria o formulario
  * 
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formNotaEmail');
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/nota/email-enviar-post'));
     $oElm = $this->createElement('hidden', 'id_nfse');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'email');
     $oElm->setLabel('Email:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->addValidator(new Zend_Validate_EmailAddress());
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     return $this;
 }
 /**
  * Cria o formulario
  * 
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formProtocoloEnvioEmail');
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/protocolo/enviar-email'));
     $oElm = $this->createElement('hidden', 'id');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'email');
     $oElm->setLabel('Email:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->addValidator(new Zend_Validate_EmailAddress());
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     return $this;
 }
 /**
  * Construtor da classe, utilizado padrão HTML para uso do TwitterBootstrap
  * 
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oTradutor = $this->getTranslator();
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formEsqueciSenha');
     $this->setAction($oBaseUrlHelper->baseUrl('/auth/login/esqueci-minha-senha-post'));
     $this->setMethod('post');
     $oElm = $this->createElement('text', 'email');
     $oElm->setLabel('Email:');
     $oElm->setAttrib('class', 'span3');
     $oElm->addValidator(new Zend_Validate_EmailAddress());
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addElement('submit', 'submit', array('label' => 'Recuperar Senha', 'class' => 'pull-right', 'data-loading-text' => $oTradutor->_('Aguarde...'), 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY));
     return $this;
 }
 /**
  * (non-PHPdoc)
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $oValidatorLength = new Zend_Validate_StringLength(array('min' => 7, 'max' => 7));
     $oValidaData = new Zend_Validate_Date(array('format' => 'MM/yyyy'));
     $this->setName('formLivroFiscal');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/contribuinte/relatorio/livro-fiscal-gerar'));
     $oElm = $this->createElement('text', 'inscricao_municipal', array('divspan' => '4'));
     $oElm->setLabel('Inscrição Municipal:');
     $oElm->setAttrib('class', 'span2');
     $oElm->setAttrib('maxlength', '14');
     $oElm->setAttrib('data-url', $oBaseUrlHelper->baseUrl('/contribuinte/empresa/dados-cgm/'));
     $oElm->addFilter(new Zend_Filter_Digits());
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'razao_social', array('divspan' => '6'));
     $oElm->setLabel('Razão Social:');
     $oElm->setAttrib('class', 'span5');
     $oElm->setAttrib('disabled', 'true');
     $oElm->removeDecorator('errors');
     $oElm->setIgnore(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'data_competencia_inicial', array('divspan' => '4'));
     $oElm->setLabel('Competência Inicial:');
     $oElm->setAttrib('class', 'span2');
     $oElm->setAttrib('placeholder', 'Mês/Ano');
     $oElm->addValidators(array($oValidatorLength, $oValidaData));
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $oElm->setValue(date('m/Y'));
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'data_competencia_final', array('divspan' => '6'));
     $oElm->setLabel('Competência Final:');
     $oElm->setAttrib('class', 'span2');
     $oElm->setAttrib('placeholder', 'Mês/Ano');
     $oElm->addValidators(array($oValidatorLength, $oValidaData));
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $oElm->setValue(date('m/Y'));
     $this->addElement($oElm);
     $this->addElement('submit', 'btn_gerar', array('divspan' => 10, 'label' => 'Gerar Livro Fiscal', 'class' => 'span2', 'msg-loading' => 'Aguarde...', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addDisplayGroup(array('inscricao_municipal', 'razao_social', 'data_competencia_inicial', 'data_competencia_inicial_1', 'data_competencia_final', 'btn_gerar'), 'dados_consulta', array('legend' => 'Parâmetros'));
     return $this;
 }
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formRecuperarSenha');
     $this->setAction($oBaseUrlHelper->baseUrl('/auth/login/recuperar-senha-post'));
     $this->setMethod('post');
     $oElm = $this->createElement('text', 'hash', array('divspan' => 9));
     $oElm->setLabel('Código Verificação:');
     $oElm->setAttrib('class', 'span7');
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'email', array('divspan' => 9));
     $oElm->setLabel('Email:');
     $oElm->setAttrib('class', 'span7');
     $oElm->setAttrib('maxlength', 100);
     $oElm->addValidator(new Zend_Validate_EmailAddress());
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oValidaTamanhoCampo = new Zend_Validate_StringLength();
     $oValidaTamanhoCampo->setMin('6');
     $sMensagemValidacao = 'Os campos "<b>Senha</b>" e "<b>Confirme a Senha</b>" devem ser maiores de ';
     $sMensagemValidacao .= " {$oValidaTamanhoCampo->getMin()} caracteres.";
     $oElm = $this->createElement('password', 'senha', array('divspan' => 9));
     $oElm->setLabel('Senha:');
     $oElm->addValidator(new Zend_Validate_Identical('senharepetida'));
     $oElm->setAttrib('message-error', $sMensagemValidacao);
     $oElm->setAttrib('class', 'span3');
     $oElm->setAttrib('minlength', $oValidaTamanhoCampo->getMin());
     $oElm->setRequired(TRUE);
     $oElm->addValidator($oValidaTamanhoCampo);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $oElm = $this->createElement('password', 'senharepetida', array('divspan' => 9));
     $oElm->setLabel('Confirme a Senha:');
     $oElm->setAttrib('class', 'span3');
     $oElm->setAttrib('minlength', $oValidaTamanhoCampo->getMin());
     $oElm->addValidator(new Zend_Validate_Identical('senha'));
     $oElm->addValidator($oValidaTamanhoCampo);
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addDisplayGroup(array('hash', 'email', 'senha', 'senharepetida'), 'dados_liberacao', array('legend' => 'Recuperação de Senha'));
     $this->addElement('submit', 'confirmar', array('label' => 'Confirmar', 'class' => 'span2', 'style' => 'margin-left:30px', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_PRIMARY));
 }
 /**
  * Método construtor
  *
  * (non-PHPdoc)
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('formInformativo');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/fiscal/informativo/form-salvar'));
     $oElm = $this->createElement('textarea', 'descricao', array('divspan' => 10));
     $oElm->setLabel('Descrição do Informativo:');
     $oElm->setAttrib('class', 'span9 exibir-contador-maxlength');
     $oElm->setAttrib('rows', '15');
     $oElm->setAttrib('maxlength', 1600);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $this->addElement('button', 'btn_salvar', array('divspan' => 10, 'label' => 'Salvar', 'class' => 'span2', 'msg-loading' => 'Aguarde...', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addDisplayGroup(array('descricao', 'btn_salvar'), 'dados_informativo', array('legend' => 'Informativo'));
     return $this;
 }
 /**
  * Renderiza o formulário
  *
  * @see Zend_Form::init()
  * @return Zend_form
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('CancelamentoRejeitar');
     $this->setAction($oBaseUrlHelper->baseUrl('/fiscal/cancelamento-nfse/rejeitar'));
     $oElm = $this->createElement('hidden', 'id');
     $oElm->setValue($this->solicitacao['id']);
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('textarea', 'justificativa_fiscal');
     $oElm->setLabel('Justificativa:');
     $oElm->setAttrib('style', 'width:95%');
     $oElm->setAttrib('rows', '4');
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     return $this;
 }
 /**
  * (non-PHPdoc)
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form_parametros_prefeitura_rps');
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/parametro/prefeitura-salvar-rps'));
     $oParametrosPrefeituraRps = new Administrativo_Model_ParametroPrefeituraRps();
     $aParametrosPrefeituraRps = $oParametrosPrefeituraRps->getListAll(NULL, array('tipo_nfse' => 'ASC'));
     foreach ($aParametrosPrefeituraRps as $oParametroRps) {
         $aElementos[$oParametroRps->getId()] = $this->createElement('select', (string) $oParametroRps->getTipoNfse());
         $aElementos[$oParametroRps->getId()]->setLabel("{$oParametroRps->getTipoNfseDescricao()}:");
         $aElementos[$oParametroRps->getId()]->setBelongsTo('parametros_prefeitura_rps');
         $aElementos[$oParametroRps->getId()]->setAttrib('class', 'span3');
         $aElementos[$oParametroRps->getId()]->removeDecorator('errors');
         self::setTiposEcidade($aElementos[$oParametroRps->getId()]);
     }
     $aElementos[] = $this->createElement('submit', 'btn_salvar_rps', array('label' => 'Salvar', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     $this->addElements($aElementos);
     return $this;
 }
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form_parametros_prefeitura_geral');
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/parametro/prefeitura-salvar-geral'));
     $aZendValidators = array(0 => new Zend_Validate_Float(array('locale' => 'br')), 1 => new Zend_Validate_LessThan(100), 2 => new Zend_Validate_GreaterThan(-1.0E-7));
     $oElm = $this->createElement('text', 'avisofim_emissao_nota');
     $oElm->setLabel('Nº Requisições Aviso:');
     $oElm->setAttrib('class', 'span1');
     $oElm->setAttrib('maxlength', '2');
     $oElm->setValidators($aZendValidators);
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'nota_retroativa');
     $oElm->setLabel('Dias Emissão Retroativa:');
     $oElm->setAttrib('class', 'span1');
     $oElm->setAttrib('maxlength', '2');
     $oElm->setValidators($aZendValidators);
     $oElm->setRequired(TRUE);
     $oElm->removeDecorator('errors');
     $this->addElement($oElm);
     $aValores = array('1' => 'Sim', '0' => 'Não');
     $oElm = $this->createElement('checkbox', 'verifica_autocadastro');
     $oElm->setLabel('Verificar Autocadastro:');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('checkbox', 'solicita_cancelamento');
     $oElm->setLabel('Verificar Cancelamento:');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $oElm = $this->createElement('checkbox', 'reter_pessoa_fisica');
     $oElm->setLabel('Reter imposto Pessoa Física:');
     $oElm->removeDecorator('errors');
     $oElm->setRequired(TRUE);
     $this->addElement($oElm);
     $this->addElement('submit', 'btn_salvar_geral', array('label' => 'Salvar', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     $this->btn_salvar_geral->setDecorators(array('ViewHelper'));
     return $this;
 }
예제 #29
0
 /**
  * Método construtor
  *
  * (non-PHPdoc)
  * @see Zend_Form::init()
  */
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setName('form-guias-geracao-utomatica');
     $this->setMethod(Zend_form::METHOD_POST);
     $this->setAction($oBaseUrlHelper->baseUrl('/fiscal/guias/consultar/'));
     $aMeses = DBSeller_Helper_Date_Date::getMesesArray();
     $oElm = $this->createElement('select', 'mes_competencia', array('divspan' => '3', 'multiOptions' => $aMeses));
     $oElm->setLabel('Mês:');
     $oElm->setAttrib('class', 'span2');
     $oElm->setValue(date('m'));
     $this->addElement($oElm);
     $aAnos = array(date('Y') - 0 => date('Y') - 0, date('Y') - 1 => date('Y') - 1, date('Y') - 2 => date('Y') - 2, date('Y') - 3 => date('Y') - 3, date('Y') - 4 => date('Y') - 4);
     $oElm = $this->createElement('select', 'ano_competencia', array('divspan' => '3', 'multiOptions' => $aAnos));
     $oElm->setLabel('Ano:');
     $oElm->setAttrib('class', 'span2');
     $this->addElement($oElm);
     $this->addElement('button', 'btn_consultar', array('divspan' => 3, 'label' => 'Consultar', 'class' => 'span2', 'buttonType' => Twitter_Bootstrap_Form_Element_Button::BUTTON_PRIMARY));
     $this->addElement('button', 'btn_gerar', array('divspan' => 2, 'label' => 'Gerar', 'class' => 'span2', 'disabled' => TRUE, 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     $this->addDisplayGroup(array('mes_competencia', 'ano_competencia', 'btn_consultar', 'btn_gerar'), 'group_guias_geracao', array('legend' => 'Consultar por Data'));
 }
 public function init()
 {
     $oBaseUrlHelper = new Zend_View_Helper_BaseUrl();
     $this->setAction($oBaseUrlHelper->baseUrl('/administrativo/usuario/vincular'));
     $this->setAttrib('name', 'vincula');
     $this->setMethod('post');
     $oElm = $this->createElement('hidden', 'usuario');
     $this->addElement($oElm);
     $oElm = $this->createElement('hidden', 'contribuinte');
     $this->addElement($oElm);
     $oElm = $this->createElement('button', 'buscador', array('label' => '', 'icon' => 'search', 'iconPosition' => Twitter_Bootstrap_Form_Element_Button::ICON_POSITION_LEFT));
     $oElm = $this->createElement('text', 'inscricao_municipal', array('placeholder' => 'Inscrição Municipal', 'append' => $oElm, 'class' => 'numerico'));
     $oElm->setAttrib('url-buscador', $oBaseUrlHelper->baseUrl('/administrativo/usuario/get-contribuinte'));
     $oElm->setLabel('Vincular Contribuinte');
     $this->addElement($oElm);
     $oElm = $this->createElement('text', 'nome_contribuinte');
     $oElm->setAttrib('readonly', true);
     $oElm->setAttrib('class', 'span7');
     $this->addElement($oElm);
     $this->addElement('submit', 'submit', array('label' => 'Vincular', 'buttonType' => Twitter_Bootstrap_Form_Element_Submit::BUTTON_SUCCESS));
     return $this;
 }