✏️ 正在编辑: ChamadoInteracao.php
路径:
/srv/systems_dir/yuppiecred-lidernegocios/application/forms/ChamadoInteracao.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_ChamadoInteracao extends Core_Form { public function init() { if( Yuppie_Auth::getIdentity()->grupo != 'Corretor' ){ $this->addElement('hidden', 'usuario_id', array( 'value' => Yuppie_Auth::getIdentity()->id )); $this->addElement('hidden', 'enviar_notificacao', array( 'value' => true )); } $this->addElement('textarea', 'comentario', array( 'label' => 'Comentário:', 'rows' => 5, 'cols' => 80, )); $ns = new Zend_Session_Namespace(); $acl = $ns->acl; if ($acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, 'chamado','comentario-interno')) { $this->addElement('textarea', 'comentario_interno', [ 'label' => 'Comentário Interno:', 'rows' => 3, 'cols' => 80, ]); } $file = new Zend_Form_Element_File('arquivo'); $file->setLabel('Anexar arquivo:') ->setRequired(false) ->addValidator('Size', false, '1MB') ->addValidator('Extension', false, 'xls,xlsx,csv,txt,png,pdf,jpg,jpeg'); $this->addElement($file); $this->addButtons(); $this->_setDefaultDecorators(); } protected function _setDefaultDecorators() { $this->setDecorators( array( 'FormElements', array( 'HtmlTag', array( 'tag' => 'dl', 'class' => 'form_chamado_interacao' ) ), 'Form' )); } public function addButtons() { $this->addElement('button', 'back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.close()" )); $this->addElement('submit', 'save', array( 'label' => 'Adicionar comentário', 'class' => 'bt_save' )); $ns = new Zend_Session_Namespace(); $acl = $ns->acl; if ($acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, 'chamado','adicionar-pendencia')) { $this->addElement('submit', 'pendencia', [ 'label' => 'Marcar pendência', 'class' => 'bt_delete', ]); } if ($acl->isAllowed(Yuppie_Auth::getIdentity()->grupo, 'chamado','remover-pendencia')) { $this->addElement('submit', 'pendencia_remover', [ 'label' => 'Remover pendência', 'class' => 'bt_apply', ]); } $this->addDisplayGroup(array( 'back', 'save' , 'pendencia', 'pendencia_remover'), 'buttons'); } public function removeBtnPendencia() { $this->removeElement('pendencia'); } public function removeBtnRemovePendencia() { $this->removeElement('pendencia_remover'); } }
💾 保存文件
← 返回文件管理器