Moved form helpers from application_helper to a real FormHelper
This commit is contained in:
@@ -1,27 +1,24 @@
|
||||
= form_for @conference do |f|
|
||||
.columns
|
||||
- if @conference.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@conference.errors.count, "error")} prohibited this conference from being saved:"
|
||||
%ul
|
||||
- @conference.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
|
||||
= field f, :poster, :image_field, @conference.poster_url
|
||||
= field f, :cover, :image_field, @conference.cover_url
|
||||
= f.image_field :poster, @conference.poster_url
|
||||
= f.image_field :cover, @conference.cover_url
|
||||
- # @parse_data['photos'].each do |img|
|
||||
- # - if img['width'] > 980
|
||||
- # %img{src: img['photo_file_url']}
|
||||
.columns.medium-8
|
||||
= field f, :conference_type_id, :collection_select, ConferenceType.all, attrs: [:id, :title]
|
||||
= f.collection_select :conference_type_id, ConferenceType.all, :id, :title
|
||||
.row
|
||||
.columns.small-6
|
||||
= field f, :start_date, :date_field
|
||||
= f.date_field :start_date
|
||||
.columns.small-6
|
||||
= field f, :end_date, :date_field
|
||||
= field f, :workshop_schedule_published, :check_box
|
||||
= field f, :meals_provided, :check_box
|
||||
= field f, :meal_info, :text_area
|
||||
= field f, :travel_info, :text_area
|
||||
= f.date_field :end_date
|
||||
= f.check_box :workshop_schedule_published
|
||||
= f.check_box :meals_provided
|
||||
= f.text_area :meal_info
|
||||
= f.text_area :travel_info
|
||||
.columns
|
||||
= field f, :info, :text_area
|
||||
= actions :save
|
||||
= f.text_area :info
|
||||
= f.actions :save
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.columns.medium-8
|
||||
= field f, :registration_open, :check_box, help: true
|
||||
= field f, :preregistration_info, :text_area, help: true
|
||||
= field f, :registration_info, :text_area, help: true
|
||||
= field f, :postregistration_info, :text_area, help: true
|
||||
= f.check_box :registration_open, help: true
|
||||
= f.text_area :preregistration_info, help: true
|
||||
= f.text_area :registration_info, help: true
|
||||
= f.text_area :postregistration_info, help: true
|
||||
.columns
|
||||
= actions :save
|
||||
= f.actions :save
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.columns.medium-8
|
||||
= field :is_attending, :select_tag, ConferenceRegistration::AttendingOptions, label: 'Are you attending?', value: @conference_registration.try(:is_attending)
|
||||
= select_tag :is_attending, ConferenceRegistration::AttendingOptions, label: 'Are you attending?', value: @conference_registration.try(:is_attending)
|
||||
%ol
|
||||
- @conference.registration_form_fields.each do |ff|
|
||||
%li
|
||||
- response = @conference_registration ? ConferenceRegistrationResponse.find_by(conference_registration_id: @conference_registration.id, registration_form_field_id: ff.id) : nil
|
||||
= form_field ff, response
|
||||
= actions :register
|
||||
= form_actions :register
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
.columns.medium-8
|
||||
.clearfix
|
||||
= f.fields_for :conference_host_organizations, :include_id => true do |u|
|
||||
= field u, :id, :organization_select_field, @conference.organizations[u.index], attrs: @conference
|
||||
= actions :save
|
||||
= u.organization_select_field :id, @conference.organizations[u.index] #, attrs: @conference
|
||||
= f.actions :save
|
||||
|
||||
@@ -3,13 +3,6 @@
|
||||
= tabs!
|
||||
.row
|
||||
= form_for @conference do |f|
|
||||
.columns
|
||||
- if @conference.errors.any?
|
||||
#error_explanation
|
||||
%h2= "#{pluralize(@conference.errors.count, "error")} prohibited this conference from being saved:"
|
||||
%ul
|
||||
- @conference.errors.full_messages.each do |msg|
|
||||
%li= msg
|
||||
.columns.medium-4
|
||||
=sub_tabs!
|
||||
%h2=_'conference.hosts.help.title', :t
|
||||
|
||||
Reference in New Issue
Block a user