%= error_messages_for @meal %>
<%= f.date_field :eaten_at_date, required: false %> <%= f.time_field :eaten_at_time, value: format_time(@meal.eaten_at), required: false, label: '' %>
<%= f.text_field :notes, required: false, style: "width: 95%;" %>
<%= ff.hidden_field :id %> <%= ff.hidden_field :food_id, {class: "autocomplete-value"} %> <%= label_tag :food_name do %> <%= index > 0 ? '' : t(:field_ingredients) %> * <% end %> <%= text_field_tag :food_name, (i.food.name if i.food), {class: "autocomplete autocomplete-label", style: "width: 80%;"} %> <%= 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;' %>