<% if @post_type.nil? @post_type = current_site.post_types.new end %> <%= form_for @post_type, url:{action: @post_type.new_record? ? :create : :update} , html:{class: 'validate-post-type', id: "post_type_form"} do |f| %> <%= f.hidden_field :parent_id %> <%= f.hidden_field :taxonomy %>
<%= render partial: 'layouts/admin/form_error', locals: {data: @post_type} %>
<%= f.label t('admin.table.name') %>
<%= f.text_field :name, :class => "form-control required translatable" %>
<%= f.label t('admin.table.slug') %>
<%= f.text_field :slug, :class => "form-control slug no_translate required", "data-parent" => "post_type_name" %>
<%= f.label t('admin.table.description') %>
<%= f.text_area :description, :class => "form-control translatable", :rows => 4 %>

<%= hidden_field :meta, :default_thumb, :class => "form-control unput_upload", :value => @post_type.get_option('default_thumb') %>

<%= t('admin.table.options') %>

<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_asing_categories')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_add_tags')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_add_content')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_add_content_summary')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_reviews')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_add_image_presentation')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_manage_template')}", 'right') %>
<%= raw html_tooltip("#{t('admin.post_type.tooltip.permission_add_keywords')}", 'right') %>
<%= render partial: "admin/settings/custom_fields/render", locals: {record: @post_type, field_groups: @post_type.get_field_groups({kind: "post_type"}) } %>
<% end %>