scheduled_reminders/app/views/reminders/_form.html.erb

33 lines
742 B
Plaintext
Raw Normal View History

2020-02-12 13:57:03 +01:00
<%= form_with(model: reminder, local: true) do |form| %>
<% if reminder.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(reminder.errors.count, "error") %> prohibited this reminder from being saved:</h2>
<ul>
<% reminder.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<div class="field">
<%= form.label :title %>
<%= form.text_field :title %>
</div>
<div class="field">
<%= form.label :body %>
<%= form.text_area :body %>
</div>
<div class="field">
<%= form.label :date %>
<%= form.datetime_select :date %>
</div>
<div class="actions">
<%= form.submit %>
</div>
<% end %>