✏️ 正在编辑: GerentePromotoraConvenio.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/GerentePromotoraConvenio.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_GerentePromotoraConvenio extends Core_Form { public function init() { $this->setAction($this->getView()->url(array( 'action' => 'add-convenio' ))); $this->setName('sub_form_gerente'); $this->addElement('hidden', 'gerente_id', array( 'class' => 'invisivel' )); $select = new Zend_Form_Element_Select('convenio_id'); $select->setLabel('Convênio:') ->setRequired(true) ->addMultiOptions(Core_Combos::getConveniosOptions()); $this->addElement($select); $this->addElement('text', 'codigo', array( 'label' => 'Código:', 'size' => 10 )); $this->addElement('submit', 'btn_adicionar', array( 'label' => 'Adicionar' )); $this->addDisplayGroup(array( 'gerente_id', 'convenio_id', 'codigo', 'btn_adicionar' ), 'subform', array( 'legend' => 'Convênios' )); $this->_setDefaultDecorators(); $this->_populateGerenteId(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'sub_form2' ) ), 'Form' )); } protected function _populateGerenteId() { $front = Zend_Controller_Front::getInstance(); //pega o id do cliente $id = (int) $front->getRequest()->getParam('id'); //verifica se passou o id por parâmetro if( $id > 0 ){ $elementGerenteId = $this->getElement('gerente_id'); $elementGerenteId->setValue($id); } } }
💾 保存文件
← 返回文件管理器