Added city radius provider option
This commit is contained in:
@@ -106,6 +106,8 @@ class ConferenceAdministrationController < ApplicationController
|
||||
end
|
||||
|
||||
def administrate_providers
|
||||
@conditions = Conference.default_provider_conditions.deep_merge(
|
||||
@this_conference.provider_conditions || {})
|
||||
end
|
||||
|
||||
def administrate_payment_message
|
||||
@@ -1195,6 +1197,23 @@ class ConferenceAdministrationController < ApplicationController
|
||||
return false
|
||||
end
|
||||
|
||||
def admin_update_providers
|
||||
case params[:button]
|
||||
when 'save_distance'
|
||||
@this_conference.provider_conditions ||= Conference.default_provider_conditions
|
||||
@this_conference.provider_conditions['distance'] = {
|
||||
'number' => params[:distance_number],
|
||||
'unit' => params[:distance_unit]
|
||||
}
|
||||
@this_conference.save
|
||||
set_success_message :distance_saved
|
||||
return false
|
||||
end
|
||||
|
||||
do_404
|
||||
return false
|
||||
end
|
||||
|
||||
def get_empty(hash, keys)
|
||||
keys = [keys] unless keys.is_a?(Array)
|
||||
keys.each do | key |
|
||||
|
||||
@@ -58,7 +58,7 @@ class ConferencesController < ApplicationController
|
||||
|
||||
steps = nil
|
||||
return do_404 unless registration_steps.present?
|
||||
|
||||
|
||||
@register_template = :administration if params[:admin_step].present?
|
||||
|
||||
@errors = {}
|
||||
@@ -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 @registration.city_id == conference.city_id
|
||||
if view_context.potential_provider(@registration)
|
||||
steps -= [:questions]
|
||||
|
||||
# if this is a housing provider that is not attending the conference, remove these steps
|
||||
|
||||
Reference in New Issue
Block a user