Skip to content

Commit

Permalink
Fixes invalid numeric step in unit migrations form
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed Nov 3, 2024
1 parent 2dbf97a commit 5a7f487
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/views/articles/migrate_units.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
field: :first_ratio_quantity,
value: sample[:conversion_result][:first_ratio]&.dig(:quantity),
errors: sample[:errors]&.messages&.dig(:"latest_article_version.article_unit_ratios.quantity"),
input_html: { type: :number, class: 'input-mini', required: true })
input_html: { type: :number, class: 'input-mini', required: true, step: 'any' })
%span
= '×'.html_safe
= form.input :first_ratio_unit, as: :select, include_blank: true, collection: [], required: false, label: false, input_html: {class: 'input-medium', 'data-initial-value': sample[:conversion_result][:first_ratio]&.dig(:unit)}
Expand All @@ -67,7 +67,7 @@
field: :group_order_granularity,
value: sample[:conversion_result][:group_order_granularity],
errors: sample[:errors]&.messages&.dig(:"latest_article_version.group_order_granularity"),
input_html: { type: :number, class: 'input-mini', required: true, title: "steps in which ordergroups can order this article" })
input_html: { type: :number, class: 'input-mini', required: true, step: 0.001, title: "steps in which ordergroups can order this article" })
%span
= '×'.html_safe
= form.input :group_order_unit, as: :select, collection: [], input_html: {'data-initial-value': sample[:conversion_result][:group_order_unit], class: 'input-medium'}, label: false, include_blank: false
Expand Down

0 comments on commit 5a7f487

Please sign in to comment.