Sha256: 44669e934f020c70151f481e040febc9468db23fc46f58cac128b0353357b6b7
Contents?: true
Size: 1.97 KB
Versions: 12
Compression:
Stored size: 1.97 KB
Contents
<%= form_for(@category, :html => {:id=>"form_category", :class=>"mb-0 form-horizontal", :role => "form", :method => (@category.new_record? ? :post : :put), :remote=>true}) do |f| %> <div id="category_form_error"> <%= @category.errors[:base].to_sentence %> </div> <div class="form-inputs mb-30 mt-30"> <% @category.category_type = params[:category_type] if @category.category_type.blank? && params[:category_type] != "All" %> <%= theme_form_field(@category, :name) %> <% options_list = Array[*@features.collect {|f| [f.display_name, f.name] }].sort %> <%= theme_form_select_group(@category, :category_type, options_list, param_name: "dhatu/category[category_type]", label: "Choose Type", prompt: "Select Category Type") %> <%= theme_form_field(@category, :one_liner, required: false) %> <%= theme_form_field(@category, :description, required: false, html_options: {type: :textarea}) %> <%= theme_form_field(@category, :priority, required: false, html_options: {type: :number, style: "width:70px;"}) %> <% @category.parent_id = params[:parent_id] if params[:parent_id] relation = Dhatu::Category.select("id, name").order("name ASC") relation = relation.where("category_type = '#{@category.category_type}'") if @category.category_type relation = relation.where("id != '#{@category.id}'") if @category.id categories = relation.all %> <% options = {assoc_collection: categories, required: false, editable: true, assoc_display_method: :name} %> <%= theme_form_assoc_group(@category, :parent_id, **options) %> </div> <div> <%= submit_tag("Save", :class=>"btn btn-primary pull-right ml-10") %> <%= link_to raw("<i class='fa fa-close mr-5'></i><span>Cancel</span>"), "#", onclick: "closeLargeModal();", class: "pull-right ml-10 btn btn-white" %> </div> <%= clear_tag(10) %> </div> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems