Files
growstuff/app/views/forums/_form.html.haml
2014-08-27 19:02:06 +10:00

24 lines
913 B
Plaintext

= form_for @forum, :html => { :class => 'form-horizontal', :role => "form" } do |f|
- if @forum.errors.any?
#error_explanation
%h2= "#{pluralize(@forum.errors.count, "error")} prohibited this forum from being saved:"
%ul
- @forum.errors.full_messages.each do |msg|
%li= msg
.form-group
= f.label :name, :class => 'control-label col-md-2'
.col-md-8
= f.text_field :name, :class => 'form-control'
.form-group
= f.label :description, :class => 'control-label col-md-2'
.col-md-8
= f.text_area :description, :rows => 6, :class => 'form-control'
.form-group
= f.label :owner_id, :class => 'control-label col-md-2'
.col-md-8
= collection_select(:forum, :owner_id, Member.all, :id, :login_name, {}, :class => 'form-control')
.form-group
.form-actions.col-md-offset-2.col-md-8
= f.submit 'Save', :class => 'btn btn-primary'