✏️ 正在编辑: Fornecedor.php
路径:
/srv/systems_dir/yuppiecred-bkp/application/forms/Fornecedor.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Form_Fornecedor extends Core_Form { public function init() { $this->setName('f_save_fornecedor'); $this->addElement('hidden', 'id', array( 'class' => 'invisivel' )); $this->addElement('text', 'nome', array( 'label' => 'Nome:', 'required' => true, 'size' => 35 )); $this->addElement('text', 'razao_social', array( 'label' => 'Razão Social:', 'size' => 35 )); $this->addElement('text', 'cnpj', array( 'label' => 'CNPJ:', 'onkeypress' => 'mascara(this, fcnpj)', 'maxlength' => 18, 'validators' => array( new Validators_Cnpj() ) )); $this->addElement('text', 'cep', array( 'label' => 'CEP:', 'onkeypress' => 'mascara(this, soNumeros)', 'maxlength' => 8, 'size' => 10 )); $this->addElement('text', 'endereco', array( 'label' => 'Endereço:', 'size' => 35 )); $this->addElement('text', 'complemento', array( 'label' => 'Complemento:', 'size' => 35 )); $this->addElement('text', 'bairro', array( 'label' => 'Bairro:', )); $this->addElement('text', 'cidade', array( 'label' => 'Cidade:', )); $this->addElement('text', 'uf', array( 'label' => 'UF:', 'maxlength' => 2, 'size' => 3, 'validators' => array( new Validators_Uf() ) )); $this->addElement('text', 'email', array( 'label' => 'E-mail:', 'validators' => array( 'EmailAddress' ), 'size' => 35 )); $this->addElement('text', 'celular', array( 'label' => 'Celular:', 'onkeypress' => 'mascara(this, telefone)', 'maxlength' => 14, 'size' => 15 )); $this->addElement('text', 'fax', array( 'label' => 'Fax:', 'onkeypress' => 'mascara(this, telefone)', 'maxlength' => 14, 'size' => 15 )); $this->addElement('text', 'telefone_fixo', array( 'label' => 'Fone:', 'onkeypress' => 'mascara(this, telefone)', 'maxlength' => 14, 'size' => 15 )); $this->addElement('text', 'nome_responsavel', array( 'label' => 'Reponsável:', 'size' => 35 )); $this->addElement('text', 'cpf_responsavel', array( 'label' => 'CPF:', 'onkeypress' => 'mascara(this, fcpf)', 'maxlength' => 14 )); $select = new Zend_Form_Element_Select('banco'); $select->setLabel('Banco:') ->addMultiOptions(Core_Combos::getBancosFebrabanOptions()); $this->addElement($select); $this->addElement('text', 'agencia', array( 'label' => 'Agência:', )); $this->addElement('text', 'conta', array( 'label' => 'Conta:', )); $this->addElement('text', 'titular', array( 'label' => 'Titular:', 'size' => 35, )); $this->addElement('text', 'cpf_titular', array( 'label' => 'CPF Titular:', 'onkeypress' => 'mascara(this, fcpf)', 'maxlength' => 14, 'validators' => array( new Validators_Cpf() ) )); $select = new Zend_Form_Element_Select('tipo_conta'); $select->setLabel('Tipo de Conta:') ->addMultiOptions(Core_Combos::getTiposContasOptions()); $this->addElement($select); $this->addElement('textarea', 'obs', array( 'label' => 'OBS:', 'rows' => 5, 'cols' => 40 )); $this->addElement('button', 'btn_back', array( 'label' => 'Voltar', 'class' => 'bt_back', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/fornecedor'" )); $this->addElement('submit', 'btn_save', array( 'label' => 'Salvar', 'class' => 'bt_save' )); $this->addElement('button', 'btn_new', array( 'label' => 'Novo Cadastro', 'class' => 'bt_new', 'onclick' => "window.location='" . $this->getView()->baseUrl() . "/fornecedor/save'" )); $this->addDisplayGroup(array( 'btn_back', 'btn_save', 'btn_new' ), 'buttons'); } public function populate(array $values) { if( !empty($values['cnpj']) && $values['cnpj'] ){ unset($values['cnpj']); } return parent::populate($values); } }
💾 保存文件
← 返回文件管理器