<% if @post.draft? && !@post.parent.present? %>
<%= f.submit "#{ (@post.new_record?) ? t('admin.page_title.create') : t('admin.button.publish')}", class: "btn btn-success btn-lg btn-block", onclick: "$('#post_status').val('published')" %>
<% elsif @post.draft? && @post.parent.present? %>
<%= f.submit "#{ t('admin.button.recover') }", class: "btn btn-success btn-lg btn-block", onclick: "$('#post_status').val('published')" %>
<% else %>
<%= f.submit "#{ (@post.new_record?) ? t('admin.page_title.create') : t('admin.page_title.update')}", class: "btn btn-success btn-lg btn-block" %>
<% end %>

<%= t('admin.post_type.configuration')%>

<% if @post.manage_template?(@post_type) && (template_files = get_list_template_files).present? %>
<%= select("meta", "template", template_files, { include_blank: true, selected: (params[:meta][:template] rescue false || @post.meta[:template] ) }, {class: 'form-control'}) %>
<% if (layout_files = get_list_layouts_files).present? %>
<%= select("meta", "layout", layout_files, { include_blank: true, selected: (params[:meta][:layout] rescue false || @post.meta[:layout] ) }, {class: 'form-control'}) %>
<% end %> <% end %> <% if @post_type.get_option('has_comments', false) || @post.manage_comments?(@post_type) %>
<% end %> <%= raw @post_form_extra_settings.join("") if @post_form_extra_settings.present? %>
<% if @post_type.manage_categories? %>

<%= t('admin.post_type.categories')%> *

<%= raw post_type_html_inputs(@post_type, "categories", "categories" , "checkbox" ,params[:categories] || (@post.new_record? ? [] : @post.categories.pluck("term_taxonomy.id")), "categorychecklist", true )%>
<% end %> <% if @post_type.manage_tags?%>

<%= t('admin.post_type.tags')%>

"/>
<% end %> <% if @post.manage_picture?(@post_type) %>

<%= t('admin.post_type.featured_image')%>

<% end %>