Sha256: 3aff3f5eedbc71e5cdb5c661ef6612b3622028efdb95b2292fce5608ea88e2ed
Contents?: true
Size: 1.43 KB
Versions: 23
Compression:
Stored size: 1.43 KB
Contents
<div class="card-body calculator-fields"> <div class="row mb-0"> <div class="form-group col-12 col-md-6 mb-0"> <% field_name = "#{param_prefix}[calculator_type]" %> <%= label_tag field_name, Spree.t(:calculator) %> <%= select_tag field_name, options_from_collection_for_select(Spree::Promotion::Actions::CreateItemAdjustments.calculators, :to_s, :description, promotion_action.calculator.type), class: 'type-select select2' %> </div> <% unless promotion_action.new_record? %> <div class="form-group col-12 col-md-6 mb-0 settings"> <% promotion_action.calculator.preferences.keys.map do |key| %> <% field_name = "#{param_prefix}[calculator_attributes][preferred_#{key}]" %> <%= label_tag field_name, Spree.t(key.to_s) %> <%= preference_field_tag(field_name, promotion_action.calculator.get_preference(key), key: key, type: promotion_action.calculator.preference_type(key)) %> <% end %> <%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %> </div> <% end %> </div> <% if promotion_action.calculator.respond_to?(:preferences) %> <div class="alert alert-info js-warning mt-3 mb-0"> <%= Spree.t(:calculator_settings_warning) %> </div> <% end %> </div>
Version data entries
23 entries across 23 versions & 1 rubygems