Sha256: 6566f6c3fccd35b7878726daa2ac19c2e65de32f1108cb7ee20179bd443a2dc0

Contents?: true

Size: 1.15 KB

Versions: 2

Compression:

Stored size: 1.15 KB

Contents

<%= f.field_container :name do %>
  <%= f.label :name, t("name") %><br />
  <%= f.text_field :name %>
  <%= f.error_message_on :name %>
<% end %>

<h3><%= t("properties") %></h3>

<ul class='checkbox-list' id='properties' data-hook>
<% Property.sorted.each do |property| %>
  <% selected = if @prototype.new_record?
    (params[:property] and params[:property][:id] and params[:property][:id].include?(property.id.to_s))
  else
    @prototype.properties.include?(property)
  end %>
  <li>
    <label>
      <%= check_box_tag "property[id][]", "#{property.id}", selected %>
      <%= property.name %>
    </label>
  </li>
<% end %>
</ul>

<hr />

<h3><%= t("option_types") %></h3>

<ul class='checkbox-list' id='option_types' data-hook>
<% OptionType.all.each do |option_type| %>
  <% selected = if @prototype.new_record?
    (params[:option_type] and params[:option_type][:id] and params[:option_type][:id].include?(option_type.id.to_s))
  else
    @prototype.option_types.include?(option_type)
  end %>
  <li>
    <label>
      <%= check_box_tag "option_type[id][]", "#{option_type.id}", selected %>
      <%= option_type.name %>
    </label>
  </li>
<% end %>
</ul>
<hr />

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_core-0.70.0.rc2 app/views/admin/prototypes/_form.html.erb
spree_core-0.70.RC1 app/views/admin/prototypes/_form.html.erb