Sha256: ecb68b3bb1476136428c940eb68d45fb0d11de3cb9baad2f594cfc94f16626fb

Contents?: true

Size: 1.39 KB

Versions: 40

Compression:

Stored size: 1.39 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),
                                   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 margint mb-0">
      <%= Spree.t(:calculator_settings_warning) %>
    </div>
  <% end %>
</div>

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
spree_backend-4.0.9 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.15 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.14 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.8 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.13.1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.7.1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.7 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.2.0.rc4 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.2.0.rc3 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.13 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.6 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.2.0.rc2 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.5 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.12 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.2.0.rc1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.0.4 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.11 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.10 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.2.0.beta app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-4.1.9 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb