From e641be69a6f738ff33500e48bd8f59df883ca314 Mon Sep 17 00:00:00 2001 From: Matt Barringer Date: Mon, 18 Feb 2013 06:17:52 +0100 Subject: [PATCH] Tweak the registration and submission forms --- .../register.html.haml | 48 +++++++++++-------- app/views/proposal/new.html.haml | 3 +- 2 files changed, 29 insertions(+), 22 deletions(-) diff --git a/app/views/conference_registration/register.html.haml b/app/views/conference_registration/register.html.haml index 276f39bc..b9c37521 100644 --- a/app/views/conference_registration/register.html.haml +++ b/app/views/conference_registration/register.html.haml @@ -12,29 +12,35 @@ .row-fluid .span12 = semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f| - Public Name - %br - = f.fields_for :person do |p| - = p.text_field :public_name, :for => :person - = f.input :attending_with_partner, :label => false - -# = f.input :attending_social_events, :label => false - = f.input :using_affiliated_lodging, :label => false - = f.input :handicapped_access_required, :label => false - = f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2} - = f.input :arrival, :as => :string, :input_html => {:value => (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), :id => "registration-arrival-datepicker", :readonly => "readonly" } - = f.input :departure, :as => :string, :input_html => {:value => (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), :id => "registration-departure-datepicker", :readonly => "readonly" } + = f.inputs :name => "Your Details" do + %br + Your public name (required) + %br + = f.fields_for :person do |p| + = p.text_field :public_name, :for => :person + - if @conference.use_supporter_levels? + = f.semantic_fields_for :supporter_registration do |reg| + = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels + = reg.input :code, :label => "Confirmation or registration code (if applicable)" + %span#supporter-link.help-block + + = f.input :attending_with_partner, :label => false + = f.input :using_affiliated_lodging, :label => false + = f.input :handicapped_access_required, :label => false + = f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2} + = f.inputs "Travel Info" do + = f.input :arrival, :as => :string, :input_html => {:value => (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), :id => "registration-arrival-datepicker", :readonly => "readonly" } + = f.input :departure, :as => :string, :input_html => {:value => (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), :id => "registration-departure-datepicker", :readonly => "readonly" } - if @conference.social_events.count > 0 - Do you plan on attending any of the parties? - = f.input :social_events, :as => :check_boxes, :label => false + = f.inputs "Are you planning to attend any of the parties?" do + %br Yes, I'll be attending... + %br + = f.input :social_events, :as => :check_boxes, :label => false - if @conference.use_dietary_choices? - = f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]}, - :include_blank => false, :label => "Special Dietary Restriction" - = f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)" - - if @conference.use_supporter_levels? - = f.semantic_fields_for :supporter_registration do |reg| - = reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels - = reg.input :code, :label => "Confirmation or registration code (if applicable)" - %span#supporter-link.help-block + = f.inputs "Food" do + = f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]}, + :include_blank => false, :label => "Special Dietary Restriction" + = f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)" - if @registered = f.action :submit, :button_html => { :value => "Update Registration", :class => "btn btn-primary" } = link_to "Unregister", register_conference_path(@conference.short_title),:method => :delete, :class => "btn btn-danger", diff --git a/app/views/proposal/new.html.haml b/app/views/proposal/new.html.haml index 32b5f224..1c8fdeea 100644 --- a/app/views/proposal/new.html.haml +++ b/app/views/proposal/new.html.haml @@ -2,5 +2,6 @@ .row .span12 .center-text - = @conference.call_for_papers.description + %pre + = @conference.call_for_papers.description = render 'proposal_form'