Sha256: e7e81baa6150641688a96c098c4d41b2d9312c7ca745a927efdb3e984e41caf0

Contents?: true

Size: 1.28 KB

Versions: 64

Compression:

Stored size: 1.28 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(Spree::Promotion::Actions::CreateItemAdjustments.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

64 entries across 64 versions & 2 rubygems

Version Path
solidus_backend-1.1.4 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.7 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.6 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.3 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.5 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.4 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.2 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.3 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.0 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.0.pre2 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.0.pre1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.1.0.beta1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.2 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-2.4.10 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-2.3.13 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.1 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
spree_backend-2.2.14 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.0 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb
solidus_backend-1.0.0.rc2 app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb