X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/9d566b4741eb66bf09b5c7d213aa8541886e100a..1c013c31745b335962a07057f962e47212faf80f:/src/redakcja/static/js/wiki/dialog_pubmark.js diff --git a/src/redakcja/static/js/wiki/dialog_pubmark.js b/src/redakcja/static/js/wiki/dialog_pubmark.js index 02493841..7d0126e6 100644 --- a/src/redakcja/static/js/wiki/dialog_pubmark.js +++ b/src/redakcja/static/js/wiki/dialog_pubmark.js @@ -9,8 +9,9 @@ if (!options.revision && options.revision != 0) throw "PubmarkDialog needs a revision number."; + let ctx = $.wiki.exitContext(); super(element); - this.ctx = $.wiki.exitContext(); + this.ctx = ctx; this.clearForm(); /* fill out hidden fields */ @@ -18,7 +19,11 @@ $("input[name='pubmark-id']", this.$form).val(CurrentDocument.id); $("input[name='pubmark-revision']", this.$form).val(options.revision); - + if (options.approved) { + $("input[name='pubmark-publishable']", this.$form).prop('checked'); + } else { + $("input[name='pubmark-publishable']", this.$form).removeProp('checked'); + } } cancelAction() {