From b9c374a85af735227a3c4ceb71503dc8c32a1ca5 Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 4 Mar 2022 19:53:53 +0100 Subject: [PATCH] Do not allow to clear parent in new page form A page needs a parent, unless it is the root page, but this does not get created in this dialog. --- app/views/alchemy/admin/pages/_new_page_form.html.erb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/alchemy/admin/pages/_new_page_form.html.erb b/app/views/alchemy/admin/pages/_new_page_form.html.erb index e805280370..b2d070fd54 100644 --- a/app/views/alchemy/admin/pages/_new_page_form.html.erb +++ b/app/views/alchemy/admin/pages/_new_page_form.html.erb @@ -22,6 +22,7 @@ $('input[type="text"]#page_parent_id').alchemyPageSelect({ placeholder: "<%= Alchemy.t(:search_page) %>", url: "<%= alchemy.api_pages_path %>", + allowClear: false, <% if @page.parent %> initialSelection: { id: <%= @page.parent.id %>,