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

Version Path
camaleon_cms-1.1.0 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.9 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.8 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.7 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.6 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.5 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.4 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.3 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.2 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0.1 app/views/admin/categories/_form.html.erb
camaleon_cms-1.0 app/views/admin/categories/_form.html.erb
camaleon_cms-0.2.1 app/views/admin/categories/_form.html.erb
camaleon_cms-0.2.0 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.9 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.8 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.7 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.6 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.5 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.4 app/views/admin/categories/_form.html.erb
camaleon_cms-0.1.3 app/views/admin/categories/_form.html.erb