✏️ 正在编辑: CorretorEmailAdicional.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/CorretorEmailAdicional.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_CorretorEmailAdicional extends Core_Form { public function init() { $this->setAction($this->getView()->url(array( 'action' => 'add-email-adicional' ))); $this->setName('sub_form_email_adicional'); $this->addElement('hidden', 'corretor_id', array( 'class' => 'invisivel' )); $this->addElement('text', 'descricao', array( 'label' => 'Descrição:', 'size' => 25 )); $this->addElement('text', 'email_adicional', array( 'label' => 'E-mail:', 'required' => true, 'validators' => array( 'EmailAddress' ), 'size' => 35 )); $this->addElement('submit', 'btn_adicionar', array( 'label' => 'Adicionar', 'class' => 'bt_save' )); $this->addDisplayGroup(array( 'corretor_id', 'descricao', 'email_adicional', 'btn_adicionar' ), 'subform', array( 'legend' => 'E-mail adicional' )); $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 ){ $elementId = $this->getElement('corretor_id'); $elementId->setValue($id); } } }
💾 保存文件
← 返回文件管理器