Sha256: b69e3777b3ebafc2bed4fc11c13ffb1ffc761ec128582be0cea0f6c520ee1574

Contents?: true

Size: 1.95 KB

Versions: 68

Compression:

Stored size: 1.95 KB

Contents

<% @category = @post_type.categories.new if @category.nil? %>
<%= form_for @category, as: "category", url:{action: @category.new_record? ? :create : :update},  html: {class: 'validate cama_ajax_request', id: 'form-category'}  do |f| %>
    <%= f.hidden_field :parent_id  %>
    <%= f.hidden_field :taxonomy %>
    <div class="panel-body">
      <%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @category} %>
        <div class="form-group">
            <%= f.label t('camaleon_cms.admin.table.name') %><br>
            <%= f.text_field :name, :class => "form-control required translatable" %>
        </div>
        <div class="form-group">
            <%= f.label t('camaleon_cms.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('camaleon_cms.admin.table.parent') %><br>
            <%= f.select :parent_id, ([[ t('camaleon_cms.admin.button.none'), @post_type.id]] + cama_category_get_options_html(@post_type.categories, 0, {exclude_cats: [@category.id]})),{}, {:class => "form-control"} %>
        </div>

        <div class="form-group">
          <%= f.label t('camaleon_cms.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: "camaleon_cms/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('camaleon_cms.admin.button.back')%></a>
      <button class="btn btn-primary pull-right" type="submit"><%= t('camaleon_cms.admin.button.submit')%></button>
    </div>
<% end %>

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
camaleon_cms-2.9.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.8.3 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.8.2 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.8.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.8.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.5 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.4 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.3 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.2 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.7.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.4 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.3 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.2 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.0.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.6.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.5.3.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.5.3 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.5.2 app/views/camaleon_cms/admin/categories/_form.html.erb