Sha256: fa535a0ba9f2aa0823c3dfc7a94af1554c9652fa69a4569cc224e0791423f91e

Contents?: true

Size: 1.24 KB

Versions: 45

Compression:

Stored size: 1.24 KB

Contents

<div class="calculator-fields row">

  <div class="field alpha four columns">
    <% field_name = "#{param_prefix}[calculator_type]" %>
    <%= label_tag field_name, Spree.t(:calculator) %>
    <%= select_tag field_name,
                   options_from_collection_for_select(@calculators, :to_s, :description, promotion_action.calculator.type),
                   :class => 'type-select select2 fullwidth' %>
    <% if promotion_action.calculator.respond_to?(:preferences) %>
      <span class="warning info"><%= Spree.t(:calculator_settings_warning) %></span>
    <% end %>
  </div>

  <% unless promotion_action.new_record? %>
    <div class="settings field omega four columns">
      <% 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>

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
spree_backend-2.2.14 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.13 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.12 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.11 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.10 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.9 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.1.12 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.8 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.1.11 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.7 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.1.10 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.0.13 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.1.9 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.6 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.5 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.1.8 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.0.12 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.4 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.2.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb