Moved form helpers from application_helper to a real FormHelper

This commit is contained in:
Godwin
2014-05-12 20:09:19 -06:00
parent 9ae7135c6a
commit ffa8239e42
30 changed files with 600 additions and 357 deletions
+6 -16
View File
@@ -1,23 +1,13 @@
= form_for @workshop, url: conference_workshops_path(@conference, @workshop) do |f|
.columns
- if @workshop.errors.any?
#error_explanation
%h2= "#{pluralize(@workshop.errors.count, "error")} prohibited this workshop from being saved:"
%ul
- @workshop.errors.full_messages.each do |msg|
%li= msg
= field f, :title, :text_field
= field f, :slug, :text_field
= f.text_field :title
= f.text_field :slug
.columns.medium-4
%h2=_'workshop.form.help.title', :t
=_'workshop.form.help', :p
.columns.medium-8
= field f, :info, :text_area
= field f, :workshop_stream_id, :number_field
= field f, :workshop_presentation_style, :number_field
=# field f, :min_facilitators, :number_field
=# field f, :location_id, :number_field
=# field f, :start_time, :datetime_select
=# field f, :end_time, :datetime_select
= f.text_area :info
= f.number_field :workshop_stream_id
= f.number_field :workshop_presentation_style
.columns
= actions :save
= f.actions :save