Files
danbooru/app/views/wiki_pages/new.html.erb
evazion 70b6525e69 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.
2019-11-06 21:56:21 -06:00

27 lines
1.1 KiB
Plaintext

<%= render "sidebar" %>
<% content_for(:content) do %>
<h1>New Wiki Page</h1>
<% if @wiki_page.title.present? %>
<div class="notice notice-info notice-small" id="new-wiki-page-notice">
This wiki page does not yet exist. The form below will allow you to create a new page for <%= @wiki_page.title %>. It will act as an explanation on how to use the tag for other users on the site.
</div>
<% end %>
<%= 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 %>
<%= render "secondary_links" %>