mkocher/whiteboard

View on GitHub
app/views/items/new_new_face.html.erb

Summary

Maintainability
Test Coverage
<%= form_for(@item, html: { class: 'form-horizontal' }) do |f| %>
  <%= render partial: 'errors',  locals: { f: f, item: @item} %>

  <div class="block header">
    <h2>New Face</h2>
  </div>

  <div class="block">
    <%= f.collection_select(:standup_id, Standup.all, :id, :title, {}, :class => "wide") %>
  </div>

  <div class="block with-hint">
    <%= f.text_field :title, placeholder: 'John Smith - Interviewing with Rob', class: "wide" %>
    <div class="hint always">
      Including why they are in the office makes for a much friendly welcome, e.g. Interviewing, New Pivot or Client Developer.
    </div>
  </div>

  <%= render partial: 'date_picker', locals: {f: f, item: @item} %>

  <%= f.hidden_field :post_id %>
  <%= f.hidden_field :public, value: false %>
  <%=  f.hidden_field :kind, value: 'New face' %>

  <div class="block">
    <%= f.submit "#{@item.persisted? ? "Update" : "Create"} New Face", class: "btn btn-primary btn-block" %>
  </div>
<% end %>