Update form to accept sections
This commit is contained in:
parent
a4a6e58bab
commit
ce21f00597
1 changed files with 15 additions and 0 deletions
|
@ -1,4 +1,7 @@
|
|||
<%= form_for @alert, :html => { :class => 'form-horizontal' } do |f| %>
|
||||
<% if @alert.errors.any? %>
|
||||
<%= @alert.errors.full_messages.join(',') %>
|
||||
<% end %>
|
||||
<div class="control-group">
|
||||
<%= f.label :department, :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
|
@ -11,6 +14,18 @@
|
|||
<%= f.text_field :course, :class => 'text_field' %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :sections, :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
<% 3.times do |key| %>
|
||||
<%= text_field_tag(
|
||||
'alert[sections][]',
|
||||
params[:section] ? params[:section][key] : @alert.sections[key],
|
||||
:class => 'text_field, span1'
|
||||
) %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<%= f.label :semester, :class => 'control-label' %>
|
||||
<div class="controls">
|
||||
|
|
Loading…
Reference in a new issue