Fix #5347: Don't use exception template for post validation errors

Also fixes #5173: Parenting a post to itself using the "parent id" box leads to an error.
This commit is contained in:
evazion
2022-11-13 01:58:58 -06:00
parent 33e4cbeb8d
commit f942768ce8
4 changed files with 13 additions and 13 deletions

View File

@@ -7,9 +7,7 @@
<%= render_source_data(nil) %>
<%= edit_form_for(post, html: { id: "form" }) do |f| %>
<%= f.input :tags_query, as: :hidden, input_html: { id: nil, name: "tags_query", value: params[:q] } %>
<%= f.input :pool_id, as: :hidden, input_html: { id: nil, name: "pool_id", value: params[:pool_id] } %>
<%= f.input :favgroup_id, as: :hidden, input_html: { id: nil, name: "favgroup_id", value: params[:favgroup_id] } %>
<%= f.input :q, as: :hidden, input_html: { id: nil, name: "q", value: params[:q] } %>
<%= f.input :old_tag_string, as: :hidden, input_html: { value: post.tag_string } %>
<%= f.input :old_parent_id, as: :hidden, input_html: { value: post.parent_id } %>
<%= f.input :old_source, as: :hidden, input_html: { value: post.source } %>

View File

@@ -299,9 +299,7 @@
<section id="mark-as-translated-section">
<%= edit_form_for(@post, url: mark_as_translated_post_path(@post), method: :put) do |f| %>
<%= f.input :tags_query, as: :hidden, input_html: { id: nil, name: "tags_query", value: params[:q] } %>
<%= f.input :pool_id, as: :hidden, input_html: { id: nil, name: "pool_id", value: params[:pool_id] } %>
<%= f.input :favgroup_id, as: :hidden, input_html: { id: nil, name: "favgroup_id", value: params[:favgroup_id] } %>
<%= f.input :q, as: :hidden, input_html: { id: nil, name: "q", value: params[:q] } %>
<fieldset class="inline-fieldset">
<%= f.input :check_translation, as: :boolean, input_html: { checked: @post.has_tag?("check_translation") } %>