-
Notifications
You must be signed in to change notification settings - Fork 0
/
_form.html.erb
31 lines (29 loc) · 953 Bytes
/
_form.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<%= form_for([@movie, @screening]) do |f| %>
<% if @screening.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@screening.errors.count, "error") %> prohibited this screening from being saved:</h2>
<ul>
<% @screening.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<%= f.hidden_field :user_id, value: current_user.id %>
<%= f.hidden_field :movie_id, value: @movie.id %>
<div class="field">
<%= f.label :date_watched, "Date Watched" %><br>
<%= f.date_field :date_watched %>
</div>
<div class="field">
<%= f.label :location_watched, "Location Watched"" %><br>
<%= f.text_field :location_watched %>
</div>
<div class="field">
<%= f.label :notes %><br>
<%= f.text_area :notes %>
</div>
<div class="actions">
<%= f.submit "Save", id: "screening_submit_button_screening_form" %>
</div>
<% end %>