Prepare merge

This commit is contained in:
Giuseppe Criscione 2024-10-03 22:14:13 +02:00
parent a0043ef120
commit 2bae9faaa3
3 changed files with 37 additions and 27 deletions

View File

@ -174,16 +174,16 @@ class PagesController extends AbstractController
try {
// Validate fields against data
$fields->setValuesFromRequest($this->request, null)->validate();
$forceUpdate = false;
if ($this->request->query()->has('publish')) {
$fields->setValues(['published' => Constraint::isTruthy($this->request->query()->get('publish'))]);
$forceUpdate = true;
}
$error = false;
// Update the page
$page = $this->updatePage($page, $data, $fields, force: $forceUpdate);

File diff suppressed because one or more lines are too long

View File

@ -172,7 +172,7 @@ export class Pages {
if (commandPreview) {
const editorForm = app.forms["page-editor-form"];
const pageParent = $("#page-parent", editorForm.element) as HTMLInputElement;
const pageParent = $("#parent", editorForm.element) as HTMLInputElement;
const previousParent = pageParent.value;
if (editorForm) {