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:
@@ -1,10 +1,8 @@
|
||||
<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? %>
|
||||
<%= simple_form_for(@wiki_page, url: wiki_page_path(@wiki_page.id)) do |f| %>
|
||||
<% if 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>
|
||||
@@ -26,8 +24,7 @@
|
||||
<%= f.input :skip_secondary_validations, as: :boolean, label: "Force rename", hint: "Ignore the renaming requirements" %>
|
||||
<% end %>
|
||||
|
||||
<%= f.button :submit, "Submit" %>
|
||||
<%= f.submit "Submit" %>
|
||||
<%= dtext_preview_button "wiki_page", "body" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user