✏️ 正在编辑: RoteiroOperacional.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/RoteiroOperacional.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_RoteiroOperacional extends Core_Form { public function init() { parent::init(); $this->setName('f_roteiro_operacional') ->setEnctype(Zend_Form::ENCTYPE_MULTIPART); $this->addElement('hidden', 'id', array( 'class' => 'invisivel' )); $tipo = new Zend_Form_Element_Select('grupo_id'); $tipo->setLabel('Grupo:') ->setRequired(true) ->addMultiOptions(Core_Combos::getGruposDocumentosOptions()); $this->addElement($tipo); $this->getElement('grupo_id')->setAttrib("style", "width: 200px"); $tipo = new Zend_Form_Element_Select('banco_id'); $tipo->setLabel('Banco:') ->addMultiOptions(Core_Combos::getBancosOptions()); $this->addElement($tipo); $this->addElement('text', 'descricao', array( 'label' => 'Descrição:', 'required' => true, 'size' => 140, 'class' => "not_upper" )); $this->addElement('text', 'link', array( 'label' => 'Link:', 'size' => 140, 'class' => "not_upper" )); $this->getElement('link') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $params = $this->_getParams(); $dados = null; $model = new Model_RoteiroOperacional(); if( isset($params['id']) && $params['id'] > 0 ){ $dados = $model->exibir($params['id']); } if( !empty($dados->arquivo) ){ $this->addElement('file', 'arquivo', array( 'label' => 'Sobrepor Arquivo:' )); $this->getElement('arquivo') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); $this->addElement('button', 'btn_download', array( 'label' => 'Baixar Arquivo', 'class' => 'bt_download', 'onclick' => "window.location='" . $this->getView()->baseUrl("roteiro-operacional/download/id/{$params['id']}") . "'" )); } else { $this->addElement('file', 'arquivo', array( 'label' => 'Arquivo:' )); $this->getElement('arquivo') ->addDecorator('Label', array( 'tag' => 'dt', 'tagClass' => 'clear' )); } $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl('roteiro-operacional') . "'" )); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save', )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl('roteiro-operacional/save') . "'" )); $this->addDisplayGroup(array( 'btn_back', 'btn_save', 'btn_new', 'btn_download' ), 'buttons'); } }
💾 保存文件
← 返回文件管理器