You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the dynamic part of the form contains ckeditor it wont save correctly.
Here is a fix for ModalRemote.js
`
/**
* Prepare submit button when modal has form
* @param {string} modalForm
* @param {object} modalFormSubmitBtn
*/
this.setupFormSubmit = function (modalForm, modalFormSubmitBtn) {
if (modalFormSubmitBtn === undefined) {
// If submit button not found throw warning message
console.warn('Modal has form but does not have a submit button');
} else {
var instance = this;
// Submit form when user clicks submit button
$(modalFormSubmitBtn).click(function (e) {
var data;
console.log('KAKI:', CKEDITOR.instances);
// Update all instance of CKEDITOR for ajax submit.
for (var i in CKEDITOR.instances) {
CKEDITOR.instances[i].updateElement()
}
// Test if browser supports FormData which handles uploads
if (window.FormData) {
//console.log($(modalForm));
data = new FormData($(modalForm)[0]);
} else {
// Fallback to serialize
data = $(modalForm).serializeArray();
}
// Send the form to server by ajax:
instance.doRemote(
$(modalForm).attr('action'),
$(modalForm).hasAttr('method') ? $(modalForm).attr('method') : 'GET',
data
);
});
}
};
`
The text was updated successfully, but these errors were encountered:
If the dynamic part of the form contains ckeditor it wont save correctly.
Here is a fix for ModalRemote.js
`
/**
* Prepare submit button when modal has form
* @param {string} modalForm
* @param {object} modalFormSubmitBtn
*/
this.setupFormSubmit = function (modalForm, modalFormSubmitBtn) {
`
The text was updated successfully, but these errors were encountered: