-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bde1f6d
commit 4098264
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %> |