Skip to content

Commit

Permalink
Recover file
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaM2429 committed Oct 13, 2023
1 parent bde1f6d commit 4098264
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/views/recipe_foods/_form.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%= form_with(model:[recipe_food], class: 'container' ) do |form| %>
<div class="form-div d-flex flex-wrap column-gap-3 row-gap-3">
<%= form.hidden_field :recipe_id, value: recipe.id %>
<%= form.collection_select :food_id, foods, :id, :name, class: 'select' %>
<div class="d-flex flex-wrap column-gap-3">
<%= form.label :quantity, "Necessary quantity:", class: 'col-form-label' %>
<%= form.text_field :quantity, :required => true, class: 'form-control-lg', type: 'number', step: '0.1', min: 1, value: 1 %>
</div>
<div class="d-flex column-gap-3">
<%= form.submit "Add", class: 'btn btn-success btn-lg' %>
<%= link_to 'Cancel', recipe_path(recipe.id), class: 'btn btn-danger btn-lg' %>
</div>
</div>
<% end %>

0 comments on commit 4098264

Please sign in to comment.