%= error_messages_for @meal %>
<%= ff.hidden_field :id %> <%= ff.hidden_field :food_id, {class: "autocomplete-value"} %> <%= label_tag :food_name, index > 0 ? '' : t(:field_ingredients) %> <%= text_field_tag :food_name, nil, {class: "autocomplete autocomplete-label", style: "width: 80%;", required: true} %> <%= ff.number_field :amount, {style: "width: 8%", step: :any, label: ''} %> <%= i.food.ref_unit.shortname if i.food %> <%= ff.hidden_field :_destroy %> |
<%= link_to t(".button_delete_ingredient"), '#', class: 'icon icon-del', style: (@meal.ingredients.length > 1 ? "" : "display:none"), onclick: "deleteIngredient(); return false;" %> |
<%= link_to t(".button_new_ingredient"), '#', class: 'icon icon-add', onclick: 'newIngredient(); return false;' %>