Sha256: 73aa2fabde9a6ad61639ba8dca532461d41fea434699768db0dcfd6dbf2beec0

Contents?: true

Size: 1.42 KB

Versions: 33

Compression:

Stored size: 1.42 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(@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">
        <% 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>
  <% if promotion_action.calculator.respond_to?(:preferences) %>
    <div class="alert alert-info js-warning mt-3 mb-0">
      <%= Spree.t(:calculator_settings_warning) %>
    </div>
  <% end %>
</div>

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
spree_backend-4.8.4 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.8.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.8.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.8.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.2.7 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.3.3 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.7.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.6.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.7.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.7.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.6.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.6.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.5.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.5.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.2.6 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.3.2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.4.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.4.0 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.4.0.rc2 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb
spree_backend-4.3.1 app/views/spree/admin/promotions/actions/_create_adjustment.html.erb