mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-05 22:26:07 +00:00
Initialize on_demand checkbox value
This commit is contained in:
@@ -34,6 +34,7 @@ module Spree
|
||||
else
|
||||
# Re-fill the form with deleted params on product
|
||||
@on_hand = request.params[:product][:on_hand]
|
||||
@on_demand = request.params[:product][:on_demand]
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
= f.field_container :on_demand do
|
||||
= f.label :on_demand, t(".on_demand")
|
||||
%br/
|
||||
= f.check_box :on_demand
|
||||
= f.check_box :on_demand, value: '1', checked: @on_demand == '1'
|
||||
= f.error_message_on :on_demand
|
||||
|
||||
.sixteen.columns.alpha
|
||||
|
||||
Reference in New Issue
Block a user