✏️ 正在编辑: ClienteCallcenter.php
路径:
/srv/systems_dir/yuppiecred/application/forms/Filtro/ClienteCallcenter.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_Filtro_ClienteCallcenter extends Core_Form { public function init() { $this->setMethod('post'); $this->setName('f_filtro_cliente_callcenter'); $this->setAttrib('autocomplete', 'off'); $selectCampanha = new Zend_Form_Element_Multiselect('campanha_id'); $selectCampanha->setLabel('Campanha:') ->setRequired(true) ->setAttrib('class', 'multi') ->addMultiOptions(Core_Combos::getCallcenterCampanhasOptions(false, null, true, true)); $this->addElement($selectCampanha); $select = new Zend_Form_Element_Select('status_atendimento'); $select->setLabel('Status:') ->addMultiOptions(Core_Combos::getCallcenterStatusOptions()); $this->addElement($select); $this->addElement('text', 'nome', array( 'label' => 'Nome:', 'size' => 40 )); $this->getElement('nome') ->addDecorator('Label', array('tag' => 'dt', 'tagClass' => 'clear')); $this->addElement('text', 'cpf', array( 'label' => 'CPF:', 'onkeypress' => 'mascara(this, fcpf)', 'maxlength' => 14 )); $this->addElement('text', 'fone', array( 'label' => 'Telefone:', 'size' => 15, 'maxlength' => 15, 'onkeypress' => 'mascara(this, telefone)' )); $this->_initButtons(); $this->_setDefaultDecorators(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'filtro_rel_producao_analitico' ) ), 'Form' )); } protected function _initButtons() { $this->addElement('submit', 'btn_filtrar', array( 'label' => 'Buscar', 'class' => 'bt_find' )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/callcenter/adicionar-cliente-base'" )); $this->addDisplayGroup(['btn_filtrar', 'btn_new'], 'buttons'); } public function isValid($data) { $valid = true; if (empty($data['nome']) && empty($data['cpf']) && empty($data['fone'])) { $this->getElement('nome') ->addError('Você deve informar o NOME, CPF ou FONE do cliente para buscar'); $valid = false; } return $valid && parent::isValid($data); } }
💾 保存文件
← 返回文件管理器