✏️ 正在编辑: AnaliseFisico.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/AnaliseFisico.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_AnaliseFisico extends Core_Form { public function init() { $this->setMethod('post'); $this->setName('f_importar'); $this->setAttrib('autocomplete', 'off'); $this->setAttrib('enctype', 'multipart/form-data'); $this->setAttrib('onsubmit', 'importarPlanilha(this); return false;'); $select = new Zend_Form_Element_Select('banco_id'); $select->setLabel('Banco:') ->setRequired(true) ->setAttrib('onchange', "populateComboTipoImportacao(this.id, 'tipo_importacao')") ->setAttrib('style', 'width: 200px;') ->addMultiOptions(Core_Combos::getBancosOptions() + ['GENERICO' => 'GENERICO']); $this->addElement($select); $select = new Zend_Form_Element_Select('tipo_importacao'); $select->setLabel("Tipo:") ->setRegisterInArrayValidator(false); $this->addElement($select); $file = new Zend_Form_Element_File('arquivo'); $file->setLabel('Arquivo:') ->setRequired(true); $this->addElement($file); $this->addElement('submit', 'btn_visualizar', array( 'label' => 'Carregar análise', 'class' => 'bt_sincronizar' )); $this->addElement('button', 'btn_generico', [ 'label' => 'Download Layout Genérico', 'class' => 'bt_export' ]); $this->_setDefaultDecorators(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'form_importar' ) ), 'Form' )); } protected function _addButtonExportExcel() { $front = Zend_Controller_Front::getInstance(); //pega o id do cliente $request = $front->getRequest(); //verifica se passou o id por parâmetro if( $request->isPost() ){ $this->addElement('button', 'btn_new_contrato', array( 'label' => 'Exportar Planilha', 'class' => 'bt_new_contrato', 'onclick' => "window.location='" . $this->getView()->baseUrl("contrato/save/cliente_id/{$id}") . "'" )); } } }
💾 保存文件
← 返回文件管理器