diff --git a/app/views/alerts/_form.html.erb b/app/views/alerts/_form.html.erb index 5937420..79d38f4 100644 --- a/app/views/alerts/_form.html.erb +++ b/app/views/alerts/_form.html.erb @@ -1,4 +1,7 @@ <%= form_for @alert, :html => { :class => 'form-horizontal' } do |f| %> + <% if @alert.errors.any? %> + <%= @alert.errors.full_messages.join(',') %> + <% end %>
<%= f.label :department, :class => 'control-label' %>
@@ -11,6 +14,18 @@ <%= 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' %>