admin: fix page editing

This commit is contained in:
E. S. 2024-03-09 16:27:13 +00:00
parent 4a96cc6b5a
commit b9b27b7ed2
2 changed files with 2 additions and 2 deletions

View File

@ -263,7 +263,7 @@ class AdminHandler extends request_handler {
$page->edit([ $page->edit([
'title' => $title, 'title' => $title,
'md' => $text, 'md' => $text,
'visible' => (int)$visible, 'visible' => (bool)$visible,
'short_name' => $short_name, 'short_name' => $short_name,
]); ]);

View File

@ -134,7 +134,7 @@ class AdminWriteEditForm {
} }
// fd.append('lang', this.getCurrentLang()) // fd.append('lang', this.getCurrentLang())
if (this.isPost()) if (this.isPost() || this.isEditing())
fd.append('visible', ge('visible_cb').checked ? 1 : 0) fd.append('visible', ge('visible_cb').checked ? 1 : 0)
// text-specific fields // text-specific fields