Sha256: 7cd069adf545d6661c9422ed18acb4e02d90ffd17ab0a9ae77c1c5edb4c2c7a8
Contents?: true
Size: 1.13 KB
Versions: 35
Compression:
Stored size: 1.13 KB
Contents
<div class="card-body calculator-fields"> <% promotion_action.promotion_action_line_items.each do |item| %> <% variant = item.variant %> <strong><%= item.quantity %> x <%= variant.name %></strong> <%= variant.options_text %> <% end %> <% if promotion_action.promotion_action_line_items.empty? %> <% line_items = promotion_action.promotion_action_line_items %> <% line_items.build %> <% line_items.each_with_index do |line_item, index| %> <div class="add-line-item"> <% line_item_prefix = "#{param_prefix}[promotion_action_line_items_attributes][#{index}]" %> <div class="form-group"> <%= label_tag "#{line_item_prefix}_variant_id", Spree.t(:variant) %> <%= select_tag "#{line_item_prefix}[variant_id]", line_item.variant_id, class: 'variant_autocomplete d-block w-100' %> </div> <div class="form-group mb-0"> <%= label_tag "#{line_item_prefix}_quantity", Spree.t(:quantity) %> <%= number_field_tag "#{line_item_prefix}[quantity]", line_item.quantity, min: 1, class: 'form-control' %> </div> </div> <% end %> <% end %> </div>
Version data entries
35 entries across 35 versions & 1 rubygems