Skip to content

Commit

Permalink
Do not allow to clear parent in new page form
Browse files Browse the repository at this point in the history
A page needs a parent, unless it is the root page, but this does not get created in this dialog.
  • Loading branch information
tvdeyen committed Mar 4, 2022
1 parent 01eb770 commit b9c374a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/views/alchemy/admin/pages/_new_page_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>,
Expand Down

0 comments on commit b9c374a

Please sign in to comment.