%= error_messages_for @meal %>
<%= ff.hidden_field :id %> <%= ff.text_field :food_id, {class: "autocomplete food-autocomplete", style: "width: 80%;", required: true, label: (index > 0 ? '' : :field_ingredients)} %> <%= 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;' %>