%fieldset#calculator_fields.no-border-bottom
  %legend{align: "center"}= t(:calculator)
  #preference-settings
    .field
      = f.label(:calculator_type, t(:calculator), for: 'calc_type')
      = f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {id: 'calc_type', class: 'select2 fullwidth'})
    - if !@object.new_record?
      .field
        .calculator-settings
          = f.fields_for :calculator do |calculator_form|
            = preference_fields(@object.calculator, calculator_form)
        - if @object.calculator.respond_to?(:preferences)
          %span.calculator-settings-warning.info.warning= t(:calculator_settings_warning)
