Sha256: fd663c4439936229e203a56a87610f80aa4185376eed8b7ddbf7947c8f7b7a48
Contents?: true
Size: 1.78 KB
Versions: 23
Compression:
Stored size: 1.78 KB
Contents
<% if @category.nil? @category = @post_type.categories.new end %> <%= form_for @category, url:{action: @category.new_record? ? :create : :update}, html: {class: 'validate', id: 'form-category'} do |f| %> <%= f.hidden_field :parent_id %> <%= f.hidden_field :taxonomy %> <div class="panel-body"> <%= render partial: 'layouts/admin/form_error', locals: {data: @category} %> <div class="form-group"> <%= f.label t('admin.table.name') %><br> <%= f.text_field :name, :class => "form-control required translatable" %> </div> <div class="form-group"> <%= f.label t('admin.table.slug') %><br> <%= f.text_field :slug, :class => "form-control slug no_translate required", "data-parent" => "category_name" %> </div> <div class="form-group"> <%= f.label t('admin.table.parent') %><br> <%= f.select :parent_id, [[ t('admin.button.none'), @post_type.id]] + category_get_options_html(@post_type.categories),{}, {:class => "form-control"} %> </div> <div class="form-group"> <%= f.label t('admin.table.description') %><br> <%= f.text_area :description, :class => "form-control translatable", :rows => 4 %> </div> <%= r = {html: "", category: @category}; hooks_run("category_form", r); raw(r[:html]); %> </div> <%= render partial: "admin/settings/custom_fields/render", locals: {record: @category, field_groups: @post_type.get_field_groups({kind: "Category"})} %> <div class="panel-footer"> <a class="btn btn-default" role="back" href="<%= url_for action: :index %>"><%= t('admin.button.back')%></a> <button class="btn btn-primary pull-right" type="submit"><%= t('admin.button.submit')%></button> </div> <% end %>
Version data entries
23 entries across 23 versions & 1 rubygems