Sha256: 43c6dd0d856838e7a4bd391fee86746ce97a54cbd5fa8b35af537d42a959e660

Contents?: true

Size: 912 Bytes

Versions: 6

Compression:

Stored size: 912 Bytes

Contents

<fieldset id="calculator_fields" class="js-calculator-fields no-border-bottom">
  <legend align="center"><%= Spree::Calculator.model_name.human %></legend>

  <div id="preference-settings">
    <div class="field">
      <%= f.label(:calculator_type, Spree::Calculator.model_name.human) %>
      <%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {class: 'custom-select fullwidth js-calculator-type'}) %>
    </div>

    <% @calculators.each do |calculator_class| %>
      <% calculator = f.object.calculator.class == calculator_class ? f.object.calculator : calculator_class.new %>
      <div class="js-calculator-preferences" data-calculator-type="<%= calculator_class %>">
        <%= f.fields_for :calculator, calculator do |calculator_form| %>
          <%= preference_fields(calculator, calculator_form) %>
        <% end %>
      </div>
    <% end %>
  </div>
</fieldset>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
solidus_backend-2.3.1 app/views/spree/admin/shared/_calculator_fields.html.erb
solidus_backend-2.3.0 app/views/spree/admin/shared/_calculator_fields.html.erb
solidus_backend-2.3.0.rc3 app/views/spree/admin/shared/_calculator_fields.html.erb
solidus_backend-2.3.0.rc2 app/views/spree/admin/shared/_calculator_fields.html.erb
solidus_backend-2.3.0.rc1 app/views/spree/admin/shared/_calculator_fields.html.erb
solidus_backend-2.3.0.beta1 app/views/spree/admin/shared/_calculator_fields.html.erb