34 lines
1.4 KiB
Plaintext
34 lines
1.4 KiB
Plaintext
<div id="form-content">
|
|
<%= error_messages_for("wiki_page") %>
|
|
|
|
<%= simple_form_for(@wiki_page) do |f| %>
|
|
<% if @wiki_page.new_record? %>
|
|
<%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } } %>
|
|
<% elsif CurrentUser.is_builder? %>
|
|
<%= f.input :title, error: false, input_html: { data: { autocomplete: "tag" } }, hint: "Change to rename this wiki page. Move the tag and update any wikis linking to this page first." %>
|
|
<% else %>
|
|
<h1 id="wiki-page-title"><%= @wiki_page.pretty_title %></h1>
|
|
<% end %>
|
|
|
|
<%= f.input :other_names, :as => :text, :label => "Other names (<a href='/wiki_pages/help:translated_tags'>view help</a>)".html_safe, :hint => "Names used for this tag on other sites such as Pixiv. Separate with spaces." %>
|
|
|
|
<%= dtext_field "wiki_page", "body" %>
|
|
|
|
<% if CurrentUser.is_builder? && @wiki_page.is_deleted? %>
|
|
<%= f.input :is_deleted, :label => "Deleted", :hint => "Uncheck to restore this wiki page" %>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.is_builder? %>
|
|
<%= f.input :is_locked, :label => "Locked" %>
|
|
<% end %>
|
|
|
|
<% if @wiki_page.errors[:title].present? %>
|
|
<%= f.input :skip_secondary_validations, as: :boolean, label: "Force rename", hint: "Ignore the renaming requirements" %>
|
|
<% end %>
|
|
|
|
<%= f.button :submit, "Submit" %>
|
|
<%= dtext_preview_button "wiki_page", "body" %>
|
|
<% end %>
|
|
</div>
|
|
|