✏️ 正在编辑: MensagemEnviar.php
路径:
/srv/systems_dir/oakberry/application/forms/MensagemEnviar.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_MensagemEnviar extends Yuppie_Form_Save { public function init() { $this->setMethod('post'); $this->setName('f_enviar_mensagem'); $this->setAttrib('autocomplete', 'off'); $this->setAction($this->_prepareUrl()); $this->addElement('select', 'email_from', array( 'label' => 'E-mail:', 'required' => true, 'multiOptions' => Core_Combos::getEmailsFrom() )); $this->_prepareUrl(); $this->_initButtons(); } protected function _initButtons() { $front = Zend_Controller_Front::getInstance(); $params = $front->getRequest()->getParams(); $this->addElement('button', 'back', array( 'label' => 'Voltar', 'iconLeft' => 'glyphicon glyphicon-arrow-left', 'ignore' => true, 'formnovalidate' => 'formnovalidate', 'onclick' => "window.location='" . $this->getView()->url( array( 'module' => $params['module'], 'controller' => $params['controller'], 'action' => 'index'), null, true) . "'" )); $this->addElement('submit', 'save', array( 'label' => 'Enviar', // 'iconLeft' => 'glyphicon glyphicon-floppy-disk', 'buttonType' => 'primary', 'ignore' => true, )); $this->addDisplayGroup( array('back', 'save'), 'buttons', array( 'decorators' => array( 'FormElements', array('HtmlTag', array( 'class' => 'col-sm-12 buttons', 'tag' => 'div') ) ) ) ); } protected function _prepareUrl() { $frontController = Zend_Controller_Front::getInstance(); $values = $frontController->getRequest()->getParams(); $values['controller'] = "mensagem"; $values['action'] = "enviar-email"; if( isset($values['contatos']) ){ $ns = new Zend_Session_Namespace('contatos_enviar'); $ns->contatos_enviar = $values['contatos']; unset($values['contatos']); } unset($values['acao']); return $this->getView()->url($values); } }
💾 保存文件
← 返回文件管理器