Sha256: df78bb7a15ea64c4b8d167bdcbbabb34ef04c33bf507706f986f843077a6a2f0

Contents?: true

Size: 1.94 KB

Versions: 9

Compression:

Stored size: 1.94 KB

Contents

<%
   if @category.nil?
     @category = @post_type.categories.new
   end


%>
<%= 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),{}, {: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

9 entries across 9 versions & 1 rubygems

Version Path
camaleon_cms-2.1.2.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.1.1.4 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.1.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.1.0 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.0.4.1 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.0.4 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.0.3 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.0.2 app/views/camaleon_cms/admin/categories/_form.html.erb
camaleon_cms-2.0.1 app/views/camaleon_cms/admin/categories/_form.html.erb