From 5a7f487258fd5cfd66958eb6d32949182c6102fb Mon Sep 17 00:00:00 2001 From: Florian Lentsch Date: Sun, 3 Nov 2024 10:04:38 +0100 Subject: [PATCH] Fixes invalid numeric step in unit migrations form --- app/views/articles/migrate_units.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/articles/migrate_units.html.haml b/app/views/articles/migrate_units.html.haml index f146e765..faddca20 100644 --- a/app/views/articles/migrate_units.html.haml +++ b/app/views/articles/migrate_units.html.haml @@ -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)} @@ -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