|
@ -123,13 +123,13 @@ class ConferencesController < ApplicationController |
|
|
@errors[:name] = :empty |
|
|
@errors[:name] = :empty |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location], language: 'en')).present? |
|
|
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? |
|
|
corrected = view_context.location(l.first, @this_conference.locale) |
|
|
city = City.search(params[:location]) |
|
|
|
|
|
|
|
|
if corrected.present? |
|
|
if city.present? |
|
|
@registration.city = corrected |
|
|
@registration.city_id = city.id |
|
|
if params[:location].gsub(/[\s,]/, '').downcase != @registration.city.gsub(/[\s,]/, '').downcase |
|
|
if params[:location].gsub(/[\s,]/, '').downcase != view_context.location(city).gsub(/[\s,]/, '').downcase |
|
|
@warnings << view_context._('warnings.messages.location_corrected', vars: {original: params[:location], corrected: corrected}) |
|
|
@warnings << view_context._('warnings.messages.location_corrected', vars: {original: params[:location], corrected: view_context.location(city)}) |
|
|
end |
|
|
end |
|
|
else |
|
|
else |
|
|
@errors[:location] = :unknown |
|
|
@errors[:location] = :unknown |
|
@ -330,7 +330,7 @@ class ConferencesController < ApplicationController |
|
|
steps -= [:questions] unless status == :open |
|
|
steps -= [:questions] unless status == :open |
|
|
steps -= [:payment] unless status == :open && conference.paypal_email_address.present? && conference.paypal_username.present? && conference.paypal_password.present? && conference.paypal_signature.present? |
|
|
steps -= [:payment] unless status == :open && conference.paypal_email_address.present? && conference.paypal_username.present? && conference.paypal_password.present? && conference.paypal_signature.present? |
|
|
if @registration.present? |
|
|
if @registration.present? |
|
|
if view_context.same_city?(@registration.city, view_context.location(conference.location, conference.locale)) |
|
|
if @registration.city_id == conference.city_id |
|
|
steps -= [:questions] |
|
|
steps -= [:questions] |
|
|
|
|
|
|
|
|
# if this is a housing provider that is not attending the conference, remove these steps |
|
|
# if this is a housing provider that is not attending the conference, remove these steps |
|
|