From 4db41f8a16f9c21c52cb355a9823ed88881d96ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=87a=C4=9Fr=C4=B1=20=C3=96zkan?= Date: Wed, 10 Feb 2021 22:52:31 +0300 Subject: [PATCH] Change on_hand's field to number_field and add required attribute --- app/views/spree/admin/products/new.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/spree/admin/products/new.html.haml b/app/views/spree/admin/products/new.html.haml index c68ce3f3bd..099e30abb3 100644 --- a/app/views/spree/admin/products/new.html.haml +++ b/app/views/spree/admin/products/new.html.haml @@ -57,7 +57,7 @@ = f.label :on_hand, t(".on_hand") %span.required * %br/ - = f.text_field :on_hand, class: 'fullwidth' + = f.number_field :on_hand, class: 'fullwidth', min: '0', required: true = f.error_message_on :on_hand .two.columns.omega = f.field_container :on_demand do