adds searching for officers when creating shifts

This commit is contained in:
rgarcia
2017-09-07 22:38:42 +02:00
parent 2fafb067cc
commit 4527236284
9 changed files with 111 additions and 49 deletions

View File

@@ -0,0 +1,29 @@
<%= form_for @shift, as: :shift, url: admin_booth_shifts_path do |f| %>
<%= render "shared/errors", resource: @shift %>
<fieldset class="fieldset">
<legend>
<%= t("admin.poll_shifts.new.new_shift") %>
</legend>
<div class="small-12 medium-4 column">
Officer: <%= @officer.name %>
<%= f.hidden_field :officer_id, value: @officer.id %>
</div>
<div class="small-12 medium-4 column">
<label><%= t("admin.poll_shifts.new.date") %></label>
<%= f.select :date,
shift_dates_select_options(@polls),
prompt: t("admin.poll_shifts.new.select_date"),
label: false %>
</div>
<%= f.hidden_field :booth_id, value: @booth.id %>
<div class="small-12 medium-4 column">
<%= f.submit t("admin.poll_shifts.new.add_shift"),
class: "button expanded hollow margin-top" %>
</div>
</fieldset>
<% end %>