diff --git a/app/views/admin/pages/_form.html.erb b/app/views/admin/pages/_form.html.erb index 4763d0c21..69cc05aa4 100644 --- a/app/views/admin/pages/_form.html.erb +++ b/app/views/admin/pages/_form.html.erb @@ -60,6 +60,12 @@ <%= form.submit class: "btn btn-primary" %> <% end %> + + <% if @page.persisted? %> + <%= form_with model: [:admin, @page], local: true, method: :delete, class: "mt-3" do |f| %> + <%= f.submit "Delete Page", class: "btn btn-danger", data: { confirm: "Are you sure?" } %> + <% end %> + <% end %>