✏️ 正在编辑: Tributo.php
路径:
/srv/systems_dir/yuppiecred/application/forms/Tributo.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_Tributo extends Zend_Form { public function init() { $this->setMethod('post'); $this->setName('f_save_tributo'); $this->setAttrib('autocomplete', 'off'); $this->addElement('hidden', 'id', array( 'class' => 'invisivel' )); $this->addElement('select', 'tipo', array( 'label' => 'Tipo:', 'required' => true, 'multiOptions' => array( 'INSS' => 'INSS', 'IRPF' => 'IRPF' ) )); $this->addElement('text', 'percentual', array( 'label' => 'Percentual:', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 15, 'size' => 15, 'onkeypress' => 'mascara(this, mvalor)' )); $this->addElement('text', 'valor_inicial', array( 'label' => 'Valor Inicial:', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 15, 'size' => 15, 'onkeypress' => 'mascara(this, mvalor)' )); $this->addElement('text', 'valor_final', array( 'label' => 'Valor Final:', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 15, 'size' => 15, 'onkeypress' => 'mascara(this, mvalor)' )); $this->addElement('text', 'valor_deducao', array( 'label' => 'Valor Dedução (IRPF):', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 15, 'size' => 15, 'onkeypress' => 'mascara(this, mvalor)' )); $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/tributo'" )); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save' )); //OPÇÃO DE ADICIONAR NOVO ITEM FOI DESATIVADA // $this->addElement('button', 'btn_new', array( // 'label' => 'Novo Cadastro', // 'class' => 'bt_new', // 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/tributo/save'" // )); $this->_elDependente(); $this->addDisplayGroup(array( 'btn_back', 'btn_save' ), 'buttons'); } protected function _elDependente() { $front = Zend_Controller_Front::getInstance(); $dependente = $front->getRequest()->getParam('dependente'); if( isset($dependente) && !empty($dependente) ){ $this->addElement('text', 'valor_dependente_irpf', array( 'label' => 'Valor Mensal Dependente (IRPF):', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 15, 'size' => 15, 'onkeypress' => 'mascara(this, mvalor)' )); $this->removeElement('tipo'); $this->removeElement('percentual'); $this->removeElement('valor_inicial'); $this->removeElement('valor_final'); $this->removeElement('valor_deducao'); $this->removeElement('valor_inicial'); } } }
💾 保存文件
← 返回文件管理器