Fixed hosting bug
This commit is contained in:
@@ -123,13 +123,13 @@ class ConferencesController < ApplicationController
|
||||
@errors[:name] = :empty
|
||||
end
|
||||
|
||||
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location], language: 'en')).present?
|
||||
corrected = view_context.location(l.first, @this_conference.locale)
|
||||
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present?
|
||||
city = City.search(params[:location])
|
||||
|
||||
if corrected.present?
|
||||
@registration.city = corrected
|
||||
if params[:location].gsub(/[\s,]/, '').downcase != @registration.city.gsub(/[\s,]/, '').downcase
|
||||
@warnings << view_context._('warnings.messages.location_corrected', vars: {original: params[:location], corrected: corrected})
|
||||
if city.present?
|
||||
@registration.city_id = city.id
|
||||
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: view_context.location(city)})
|
||||
end
|
||||
else
|
||||
@errors[:location] = :unknown
|
||||
@@ -330,7 +330,7 @@ class ConferencesController < ApplicationController
|
||||
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?
|
||||
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]
|
||||
|
||||
# if this is a housing provider that is not attending the conference, remove these steps
|
||||
|
||||
Reference in New Issue
Block a user