✏️ 正在编辑: CorretorMetasOperador.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/CorretorMetasOperador.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_CorretorMetasOperador extends Core_Form { public function init() { $this->setAction($this->getView()->url(array( 'action' => 'metas-operador' ))); $this->setName('f_save_meta'); $this->addElement('hidden', 'corretor_id', array( 'decorators' => array( 'ViewHelper' ) )); $this->addElement(Form_DatePicker::getDatePicker('data_inicial', 'Data Inicial:', '', true)); $this->addElement(Form_DatePicker::getDatePicker('data_final', 'Data Final:', '', true)); $this->addElement('text', 'meta', array( 'label' => 'Meta:', 'required' => true, 'size' => 18, 'onkeypress' => 'mascara(this, mvalor)' )); $this->getElement("meta")->setAttrib("required", "true"); $this->getElement("data_inicial")->setAttrib("required", "true"); $this->getElement("data_final")->setAttrib("required", "true"); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save', )); $this->addDisplayGroup(array( 'corretor_id', 'data_inicial', 'data_final', 'meta', 'btn_save' ), 'subform', array( 'legend' => 'Metas Operador' )); $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 corretor $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); } } }
💾 保存文件
← 返回文件管理器