%= form_for @alert, :html => { :class => 'form-horizontal' } do |f| %>
<% if @alert.errors.any? %>
<%= @alert.errors.full_messages.each do |full_message| %>
- <%= full_message %>
<% end %>
<% end %>
<%= f.label :department, :class => 'control-label' %>
<%= f.text_field :department, :class => 'text_field' %>
<%= f.label :course, :class => 'control-label' %>
<%= f.text_field :course, :class => 'text_field' %>
<%= f.label :sections, :class => 'control-label' %>
<% 3.times do |key| %>
<%= text_field_tag(
'alert[sections][]',
params[:section] ? params[:section][key] : @alert.sections[key],
:class => 'text_field, span1'
) %>
<% end %>
<%= f.label :semester, :class => 'control-label' %>
<%= f.text_field :semester, :class => 'text_field' %>
<%= f.submit nil, :class => 'btn btn-primary' %>
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
alerts_path, :class => 'btn' %>
<% end %>