Simplify sidebar and navigation

Check existence of supporter levels
This commit is contained in:
Henne Vogelsang 2014-03-04 10:10:07 +01:00
parent 59933115fc
commit 0982be8579
21 changed files with 93 additions and 169 deletions

View file

@ -18,7 +18,7 @@
= p.text_field :company, :placeholder => "Company/User Group/nothing", :as => :string
= f.inputs "Registration Information" do
- if @conference.use_supporter_levels?
- if @conference.use_supporter_levels? and @conference.supporter_levels.length > 0
= 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)"
@ -35,11 +35,6 @@
%br
= f.input :social_events, :as => :check_boxes, :label => false, :collection => @conference.social_events
- if @conference.use_dietary_choices?
= 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", :class => "span6"}, :label => "Other Dietary Restictions (please describe)"
= f.action :submit, :button_html => { :value => "Edit Registration", :class => "btn btn-primary" }
:javascript
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
@ -69,4 +64,4 @@
onSelect: function(selected) {
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
}
});
});