✏️ 正在编辑: StatusProposta.php
路径:
/srv/systems_dir/yuppiecred/application/forms/StatusProposta.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_StatusProposta extends Core_Form { public function init() { $this->setName('f_save_status_proposta'); $this->addElement('hidden', 'id', array( 'class' => 'invisivel' )); $this->addElement('text', 'descricao', array( 'label' => 'Descrição:', 'class' => 'noKeyup', 'size' => 35, 'required' => true )); $select = new Zend_Form_Element_Select('parent_id'); $select->setLabel('Status pai:') // ->setRequired(true) ->addMultiOptions(array('' => '') + Core_Combos::getStatusOptions()); $this->addElement($select); $select = new Zend_Form_Element_Select('bloqueado_alteracao'); $select->setLabel('Bloquear Alteração do Contrato:') ->addMultiOptions([ 0 => "Não", 1 => "Sim" ]); $this->addElement($select); $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/status-proposta'" )); $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() . "/status-proposta/save'" )); $this->addDisplayGroup(array( 'btn_back', 'btn_save', 'btn_new' ), 'buttons'); } public function populate(array $values) { if (isset($values['id']) && $values['id']) { $multiOptions = $this->getElement('parent_id')->getMultiOptions(); unset($multiOptions[$values['id']]); $this->getElement('parent_id')->setMultiOptions($multiOptions); } return parent::populate($values); } }
💾 保存文件
← 返回文件管理器