<% @log = decorate(@log, LogDecorator) %>

<%= form_for([@recipe, @log], html: {class: 'log-form'}) do |f| %>

  <%= render partial: 'shared/error_list', locals: {model: @log} %>

  <div class="row">
    <div class="col-xs-6">
      <div class="form-group form-group-sm">
        <%= f.label :date, class: 'control-label' %>
        <%= f.text_field :date, class: 'form-control datepicker', value: @log.date %>
      </div>
    </div>

    <div class="col-xs-6">
      <div class="form-group form-group-sm">
        <%= f.label :rating, class: 'control-label' %>
        <%= f.text_field :rating, class: 'form-control rating' %>
      </div>
    </div>

    <div class="col-xs-12">
      <div class="form-group form-group-sm">
        <%= f.label :notes, 'Log Notes', class: 'control-label' %>
        <%= f.text_area :notes, class: 'form-control' %>
      </div>
    </div>

    <div class="col-xs-12">
      <div class="actions">
        <%= f.submit class: 'btn btn-primary' %>
      </div>
    </div>
  </div>

  <%= f.fields_for(:recipe, include_id: false) do |rf| %>
    <%= render partial: 'recipes/editor', locals: {f: rf} %>
  <% end %>
  <br/><br/>

  <div class="actions">
    <%= f.submit class: 'btn btn-primary' %>
  </div>

<% end %>

