summaryrefslogtreecommitdiff
path: root/app/views/alerts/_form.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/alerts/_form.html.erb')
-rw-r--r--app/views/alerts/_form.html.erb25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb
new file mode 100644
index 0000000..f0da996
--- /dev/null
+++ b/app/views/alerts/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@alert) do |f| %>
+ <% if @alert.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@alert.errors.count, "error") %> prohibited this alert from being saved:</h2>
+
+ <ul>
+ <% @alert.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :author %><br>
+ <%= f.text_field :author %>
+ </div>
+ <div class="field">
+ <%= f.label :message %><br>
+ <%= f.text_area :message %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>