wiki pages: fix error when force renaming wiki page.

Bug: force renaming a wiki page fails. Fix: use the wiki page id instead
of the title in the update action.
This commit is contained in:
evazion
2019-11-06 15:07:02 -06:00
parent 19549e2c12
commit 70b6525e69
4 changed files with 33 additions and 8 deletions

View File

@@ -9,7 +9,16 @@
</div>
<% end %>
<%= render "form" %>
<%= error_messages_for("wiki_page") %>
<%= simple_form_for(@wiki_page) do |f| %>
<%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } } %>
<%= f.input :other_names_string, as: :text, input_html: { size: "30x1" }, label: "Other names (#{link_to_wiki "help", "help:translated_tags"})".html_safe, hint: "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>
<%= dtext_field "wiki_page", "body" %>
<%= f.submit "Submit" %>
<%= dtext_preview_button "wiki_page", "body" %>
<% end %>
<%= wiki_page_alias_and_implication_list(@wiki_page)%>
<%= wiki_page_post_previews(@wiki_page) %>
<% end %>