%= error_messages_for 'page' %>
<% resource = ::API::V3::WikiPages::WikiPageRepresenter.new(@page, current_user: current_user, embed_links: true) %>
<%= f.fields_for :page, @page do |page_fields| %>
<%= page_fields.hidden_field :parent_id %>
<%= page_fields.text_field :title, required: true, size: 120, placeholder: t('label_page_title') %>
<% end %>
<%= f.fields_for :page, @page do |page_fields| %>
<%= page_fields.select :parent_id,
wiki_page_options_for_select(@wiki.pages),
{ label: WikiPage.human_attribute_name(:parent_title), include_blank: false },
{ class: "parent-select form--select" } %>
<% end%>
<%= f.text_area :text,
cols: 100,
rows: 25,
class: 'wiki-edit',
accesskey: accesskey(:edit),
with_text_formatting: true,
resource: resource,
preview_context: preview_context(@page, @project) %>
<%= f.text_field :comments, size: 120 %>
<%= f.button t(:button_save), class: 'button -highlight -with-icon icon-checkmark' %>