after save content redirect to the proper tab to avoid confusion if the content was created or not #1541
This commit is contained in:
parent
437190fcbb
commit
49fb7f03b1
1 changed files with 5 additions and 0 deletions
|
@ -466,18 +466,23 @@ foreach ($customFields as $field => $options) {
|
|||
|
||||
// Button Save
|
||||
$("#jsbuttonSave").on("click", function() {
|
||||
let actionParameters = '';
|
||||
|
||||
// If the switch is setted to "published", get the value from the selector
|
||||
if ($("#jsbuttonSwitch").data("switch") == "publish") {
|
||||
var value = $("#jstypeSelector option:selected").val();
|
||||
$("#jstype").val(value);
|
||||
actionParameters = '#' + value;
|
||||
} else {
|
||||
$("#jstype").val("draft");
|
||||
actionParameters = '#draft';
|
||||
}
|
||||
|
||||
// Get the content
|
||||
$("#jscontent").val(editorGetContent());
|
||||
|
||||
// Submit the form
|
||||
$("#jsform").attr('action', actionParameters);
|
||||
$("#jsform").submit();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue