✏️ 正在编辑: CallcenterTelefone.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/CallcenterTelefone.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_CallcenterTelefone extends Core_Form { public function init() { $this->setAction($this->getView()->url(array( 'action' => 'adicionar-telefone' ))); $this->setName('sub_form_cliente'); $this->addElement('hidden', 'cliente_id', array('class' => 'invisivel')); $this->addElement('text', 'fone', array( 'label' => 'Telefone:', 'onkeypress' => 'mascara(this, telefone)', 'maxlength' => 15, 'required' => true, 'size' => 15 )); $this->addElement('button', 'btn_adicionar', array( 'label' => 'Adicionar', 'onclick' => "adicionarTelefone()" )); $this->addDisplayGroup(array( 'cliente_id', 'fone', 'obs', 'btn_adicionar' ), 'subform', array('legend' => '')); $this->_setDefaultDecorators(); $this->_populateBonusId(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'sub_form' ) ), 'Form' )); } protected function _populateBonusId() { $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 ){ $elementBonusId = $this->getElement('cliente_id'); $elementBonusId->setValue($id); } } }
💾 保存文件
← 返回文件管理器