Sha256: 41cfff6d6f482af8126d93cd85fb7994211b8928cdcba24c123637bbba80ebaa

Contents?: true

Size: 1.16 KB

Versions: 17

Compression:

Stored size: 1.16 KB

Contents

<div class="calculator-fields">

  <p class="field">
    <% field_name = "#{param_prefix}[calculator_type]" %>
    <%= label_tag field_name, t(:calculator) %>
    <%= select_tag field_name,
                   options_from_collection_for_select(@calculators, :to_s, :description, promotion_action.calculator.type),
                   :class => 'type-select' %>
    <% if promotion_action.calculator.respond_to?(:preferences) %>
      &nbsp; <span class="warning"><%= t(:calculator_settings_warning) %></span>
    <% end %>
  </p>

  <% unless promotion_action.new_record? %>
    <div class="settings">
      <% promotion_action.calculator.preferences.keys.map do |key| %>
        <% field_name = "#{param_prefix}[calculator_attributes][preferred_#{key}]" %>
        <%= label_tag field_name, 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

17 entries across 17 versions & 1 rubygems

Version Path
spree_promo-1.2.5 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.6 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.5 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.4 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.4 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.0.rc2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.2.0.rc1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.2.rc1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.0.rc2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_promo-1.1.0.rc1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb