Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'Parametrage':
- $("#container").empty();
- $("#container").load("params");
- break;
- $(function(){
- $('body').on('submit', 'form', function(e){
- e.preventDefault();
- $.ajax({
- type: "POST",
- url: "<?php echo site_url("params/save_form"); ?>",
- data:$(this).serialize(),
- success: function(response){
- if(response == 'true'){
- $.modal.close();
- var table = $('#table_id').DataTable();
- table.ajax.reload();
- $('#dialog-message').attr('title','Enregistrement');
- $('#msgIcon').attr('class','ui-icon ui-icon-circle-check');
- $('#msgMessage').html('Enregistré avec succès');
- $("#dialog-message").dialog({
- modal: true,
- buttons: {
- Ok: function() {
- $(this).dialog("close");
- }
- }
- });
- }else{
- $('#errors_container').html(response);
- }
- },
- error: function(){
- alert('Error');
- }
- });
- });
- });
- case 'Parametrage':
- $("#container").empty();
- //Added this line
- $('body').off("submit", "form");
- $("#container").load("params");
- break;
- $(body).off("submit", "form");
- url: "<?php echo site_url("params/save_form"); ?>",
- url: '<?php echo site_url("params/save_form"); ?>',
- url: "<?php echo site_url("params/save_form"); ?>",
- url: "<?php echo site_url("params/save_form"); ?>"
- url: "<?php echo site_url('params/save_form'); ?>",
- url: '<?php echo site_url("params/save_form"); ?>',
Add Comment
Please, Sign In to add comment