✏️ 正在编辑: nova-categoria.phtml
路径:
/srv/systems_dir/yuppiecred-bkp/application/views/scripts/categoria/nova-categoria.phtml
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<script> $(function(){ $('#f_nova_categoria #btn_save').click(function(){ var nome = $('#nome_categoria').val(); var categoria_pai = $('#categoria_pai').val(); $.ajax({ url: baseUrl + '/categoria/save-categoria', type: 'post', data: { nome: nome, categoria_pai: categoria_pai }, dataType: 'json', error: function(response){ console.log(response); $("#msgAddCateg").remove(); }, success: function(response){ if(response.status){ $('#msgAddCateg').dialog('destroy'); $('#categoria_id').append('<option value="'+ response.value +'" label="'+ nome +'">'+ nome +'</option>'); $('#categoria_id').val(response.value); $('#categoria_id').parent().find('input').val(nome); }else{ alert('Erro ao tentar adicionar uma categoria.'); } $("#msgAddCateg").remove(); } }); }); }); </script> <h1 class="tit_local">Adicionar Categoria</h1> <div id="filter"> <?php echo $this->form; ?> <div class="clear"></div> </div>
💾 保存文件
← 返回文件管理器