Merge pull request #4585 from luisramos0/backend_partial_calc_fields

Bring spree_backend calculator fields partial to OFN
This commit is contained in:
Luis Ramos
2020-01-22 20:27:10 +00:00
committed by GitHub
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
%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)

View File

@@ -2076,6 +2076,7 @@ See the %{link} to find out more about %{sitename}'s features and to start using
tax_category: "Tax Category"
calculator: "Calculator"
calculator_values: "Calculator values"
calculator_settings_warning: "If you are changing the calculator type, you must save first before you can edit the calculator settings"
flat_percent_per_item: "Flat Percent (per item)"
flat_rate_per_item: "Flat Rate (per item)"
flat_rate_per_order: "Flat Rate (per order)"