✏️ 正在编辑: ImportarEnvioFisicoBonsucesso.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/ImportarEnvioFisicoBonsucesso.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_ImportarEnvioFisicoBonsucesso 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;'); $bancoId = Model_Banco::bancoPorNome('BONSUCESSO'); $banco = new Zend_Form_Element_Hidden('banco_id'); $banco->setValue($bancoId); $this->addElement($banco); $select = new Zend_Form_Element_Select('usuario_formalizacao'); $select->setLabel('Formalizado por:') ->setRequired(true) ->setValue(Yuppie_Auth::getIdentity()->id) ->addMultiOptions(Core_Combos::getUsuariosFormalizacaoOptions()); $this->addElement($select); $this->addElement(Form_DatePicker::getDatePicker('data_envio', 'Data Envio:', date('d/m/Y'), true)); $this->addElement('text', 'bordero_newspace', array( 'label' => 'Borderô / Protocolo:', 'size' => 10, 'required' => true, 'onkeypress' => 'mascara(this, soNumeros)' )); $this->addElement('text', 'numero_envelope', array( 'label' => 'Nº Envelope:', 'size' => 10, 'required' => true, 'onkeypress' => 'mascara(this, soNumeros)' )); $file = new Zend_Form_Element_File('arquivo'); $file->setLabel('Arquivo:') ->setRequired(true); $this->addElement($file); $this->addElement('textarea', 'obs_envio_fisico', array( 'label' => 'OBS:', 'rows' => 5, 'cols' => 40 )); $this->addElement('submit', 'btn_save', array( 'label' => 'Importar Planilha', 'class' => 'bt_sincronizar' )); $this->_addButtonPrint(); $this->addDisplayGroup(array( 'btn_save' ), 'buttons'); $this->_setDefaultDecorators(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'form_baixar_fisico' ) ), 'Form' )); } protected function _addButtonPrint() { $front = Zend_Controller_Front::getInstance(); //pega o id do cliente $protocoloId = (int) $front->getRequest()->getParam('protocolo_id'); //verifica se passou o id por parâmetro if( $protocoloId > 0 ){ $this->addElement('button', 'btn_imprimir', array( 'label' => 'Imprimir Protocolo', 'class' => 'bt_imprimir', 'onclick' => "openWin('" . $this->getView()->baseUrl() . "/contrato/imprimir-protocolo-envio/protocolo_id/" . $protocoloId . "', 1024, 600)" )); } } }
💾 保存文件
← 返回文件管理器