mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Initialize with submitted value on_hand
This commit is contained in:
@@ -36,6 +36,8 @@ module Spree
|
||||
redirect_to spree.admin_products_path
|
||||
end
|
||||
else
|
||||
# Re-fill the form with deleted params on product
|
||||
@on_hand = request.params[:product][:on_hand]
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
= f.field_container :on_hand do
|
||||
= f.label :on_hand, t(".on_hand")
|
||||
%br/
|
||||
= f.text_field :on_hand, class: 'fullwidth'
|
||||
= f.text_field :on_hand, class: 'fullwidth', value: @on_hand
|
||||
= f.error_message_on :on_hand
|
||||
.three.columns.omega
|
||||
= f.field_container :on_demand do
|
||||
|
||||
Reference in New Issue
Block a user