X-Git-Url: https://git.mdrn.pl/fnpeditor.git/blobdiff_plain/c74dbad6118a7633b69884ddd062daea2320ce7c..949f04475963f4f2ae93f7a2a84ed577420514c6:/src/editor/modules/data/data.js?ds=sidebyside diff --git a/src/editor/modules/data/data.js b/src/editor/modules/data/data.js index 0d556a2..789899c 100644 --- a/src/editor/modules/data/data.js +++ b/src/editor/modules/data/data.js @@ -196,6 +196,15 @@ return function(sandbox) { url: sandbox.getConfig().documentSaveUrl(data.document_id), data: formData, success: function(data) { + // ugly! + $.each(sandbox.getConfig().documentSaveForm.fields, function(i, field) { + if (field.name.indexOf('for_cybernauts') !== -1) { + field.checked = event.formData['textsave-for_cybernauts'] === 'on'; + } + if (field.name.indexOf('publishable') !== -1) { + field.checked = event.formData['textsave-publishable'] === 'on'; + } + }); event.success(); sandbox.publish('savingEnded', 'success', 'remote', data);