diff --git a/handler/AdminHandler.php b/handler/AdminHandler.php index e5b9aab..0ba1918 100644 --- a/handler/AdminHandler.php +++ b/handler/AdminHandler.php @@ -263,7 +263,7 @@ class AdminHandler extends request_handler { $page->edit([ 'title' => $title, 'md' => $text, - 'visible' => (int)$visible, + 'visible' => (bool)$visible, 'short_name' => $short_name, ]); diff --git a/htdocs/js/admin/11-write-form.js b/htdocs/js/admin/11-write-form.js index f5d465a..aaf93f5 100644 --- a/htdocs/js/admin/11-write-form.js +++ b/htdocs/js/admin/11-write-form.js @@ -134,7 +134,7 @@ class AdminWriteEditForm { } // fd.append('lang', this.getCurrentLang()) - if (this.isPost()) + if (this.isPost() || this.isEditing()) fd.append('visible', ge('visible_cb').checked ? 1 : 0) // text-specific fields