2013-04-02 02:43:01 -04:00
|
|
|
<%= form_for @alert, :html => { :class => 'form-horizontal' } do |f| %>
|
2013-04-12 13:42:30 -04:00
|
|
|
<div class="control-group">
|
|
|
|
<ul>
|
|
|
|
<% if @alert.errors.any? %>
|
|
|
|
<%= @alert.errors.full_messages.each do |full_message| %>
|
|
|
|
<li><%= full_message %></li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2013-04-02 02:43:01 -04:00
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :department, :class => 'control-label' %>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.text_field :department, :class => 'text_field' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :course, :class => 'control-label' %>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.text_field :course, :class => 'text_field' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-12 13:18:31 -04:00
|
|
|
<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>
|
2013-04-03 19:44:01 -04:00
|
|
|
<div class="control-group">
|
|
|
|
<%= f.label :semester, :class => 'control-label' %>
|
|
|
|
<div class="controls">
|
|
|
|
<%= f.text_field :semester, :class => 'text_field' %>
|
|
|
|
</div>
|
|
|
|
</div>
|
2013-04-02 02:43:01 -04:00
|
|
|
|
|
|
|
<div class="form-actions">
|
|
|
|
<%= f.submit nil, :class => 'btn btn-primary' %>
|
|
|
|
<%= link_to t('.cancel', :default => t("helpers.links.cancel")),
|
|
|
|
alerts_path, :class => 'btn' %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|