Sha256: 3c5e4eafcaf6401b8548a66d3f06934adfeffb02ceddca56f36fa0466c5b8889

Contents?: true

Size: 1.31 KB

Versions: 47

Compression:

Stored size: 1.31 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">
      <% type_name = promotion_action.calculator.type.demodulize.underscore %>
      <% if lookup_context.exists?("fields",
          ["spree/admin/promotions/calculators/#{type_name}"], true) %>
        <%= render "spree/admin/promotions/calculators/#{type_name}/fields",
          calculator: promotion_action.calculator, prefix: param_prefix %>
      <% else %>
        <%= render "spree/admin/promotions/calculators/default_fields",
          calculator: promotion_action.calculator, prefix: param_prefix %>
      <% end %>
      <%= hidden_field_tag "#{param_prefix}[calculator_attributes][id]", promotion_action.calculator.id %>
    </div>
  <% end %>
</div>

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
spree_backend-2.4.9 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.12 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
solidus_backend-1.0.0.pre3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
solidus_backend-1.0.0.pre2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.8 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.11 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
solidus_backend-1.0.0.pre app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.7 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.10 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.6 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.9 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.8 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.5 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.4 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.7 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.3.6 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-2.4.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb