summaryrefslogtreecommitdiff
path: root/app/views/alerts/_form.html.erb
blob: e7a24448f7a9131cdae69bc79990a5b4f12bac58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<%= 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 :message %><br>
    <%= f.text_area :message %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>