mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-29 03:31:04 -05:00
26 lines
891 B
Plaintext
26 lines
891 B
Plaintext
= form_for @forum, html: { class: 'form-horizontal', role: "form" } do |f|
|
|
- if @forum.errors.any?
|
|
#error_explanation
|
|
%h2
|
|
= pluralize(@forum.errors.size, "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'
|