✏️ 正在编辑: CorretorSenha.php
路径:
/srv/systems_dir/yuppiecred/application/forms/CorretorSenha.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_CorretorSenha extends Core_Form { public function init() { $this->setAction($this->getView()->url(array( 'action' => 'add-senha' ))); $this->setName('sub_form_senha'); $this->addElement('hidden', 'corretor_id', array( 'class' => 'invisivel' )); $this->addElement('text', 'senha', array( 'label' => 'Código Usuário:', 'size' => 10, 'required' => true )); $this->getElement('senha')->setAttrib('required', true); $multiOptions = array('' => '') + Core_Combos::getBancosOptions(); $this->addElement('select', 'banco_id', array( 'label' => 'Banco:', 'multiOptions' => $multiOptions, 'required' => true )); $this->getElement('banco_id')->setAttrib('required', true); $this->addElement('text', 'descricao', array( 'label' => 'Descrição:', )); $this->addElement('submit', 'btn_adicionar', array( 'label' => 'Adicionar', 'class' => 'btn_plus' )); $this->addDisplayGroup(array( 'banco_id', 'senha', 'descricao', 'btn_adicionar' ), 'subform'); $this->_setDefaultDecorators(); $this->_populateCorretorId(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'sub_form2' ) ), 'Form' )); } protected function _populateCorretorId() { $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('corretor_id'); $elementGerenteId->setValue($id); } } }
💾 保存文件
← 返回文件管理器