41 lines
1.3 KiB
Text
41 lines
1.3 KiB
Text
<%= 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">
|
|
<%= 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>
|
|
<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">
|
|
<%= f.text_field :semester, :class => 'text_field' %>
|
|
</div>
|
|
</div>
|
|
|
|
<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 %>
|