Sha256: c492e51ff58cc9577832ba9071c5eb733dbce4039bf90e3fdb085748cf759c42
Contents?: true
Size: 1.31 KB
Versions: 89
Compression:
Stored size: 1.31 KB
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) %> <% if local_assigns.has_key? :hint %> <%= admin_hint t("spree.#{hint}"), t(hint, scope: [:spree, :hints, "spree/calculator"]) %> <% end %> <%= 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| %> <% calculator.admin_form_preference_names.each do |name| %> <%= render "spree/admin/shared/preference_fields/#{calculator.preference_type(name)}", form: calculator_form, attribute: "preferred_#{name}", label: t(name, scope: 'spree', default: name.to_s.humanize) %> <% end %> <% end %> </div> <% end %> </div> </fieldset>
Version data entries
89 entries across 89 versions & 1 rubygems