PHP Classes

File: template/Asset/modal-save

Recommend this page to a friend!
  Classes of Fabrice Fesch   Melis Tool Creator   template/Asset/modal-save   Download  
File: template/Asset/modal-save
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Melis Tool Creator
Module for the Melis CMS to create tools
Author: By
Last change:
Date: 1 year ago
Size: 1,532 bytes
 

Contents

Class file image Download
$("body").on("click", ".btnSaveModuleTpl", function(){ var btn = $(this); var id = $(this).data("id"); submitForm($("form#moduleTplForm"), id, btn); }); var submitForm = function(form, id, btn){ form.unbind("submit"); form.on("submit", function(e) { e.preventDefault(); btn.attr('disabled', true); var formData = new FormData(this); formData.append('#TCPKEY', id); #TCSAVELANG $.ajax({ type: 'POST', url: '/melis/ModuleTpl/Properties/save', data: formData, cache: false, contentType: false, processData: false, }).done(function (data) { if(data.success){ // Notifications melisHelper.melisOkNotification(data.textTitle, data.textMessage); $("#id_moduletpl_modal_container").modal("hide"); melisHelper.zoneReload("id_moduletpl_content", "moduletpl_content"); }else{ melisHelper.melisKoNotification(data.textTitle, data.textMessage, data.errors); melisHelper.highlightMultiErrors(data.success, data.errors, "#id_moduletpl_modal"); } btn.attr('disabled', false); }).fail(function () { alert(translations.tr_meliscore_error_message); }); }); form.submit(); };