mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-09 23:06:06 +00:00
Move T&C checks to service
This commit is contained in:
@@ -17,11 +17,11 @@ module TermsAndConditionsHelper
|
||||
end
|
||||
|
||||
def platform_terms_required?
|
||||
Spree::Config.shoppers_require_tos
|
||||
TermsOfService.platform_terms_required?
|
||||
end
|
||||
|
||||
def terms_and_conditions_activated?
|
||||
current_order.distributor.terms_and_conditions.file?
|
||||
TermsOfService.terms_and_conditions_activated?(current_order.distributor)
|
||||
end
|
||||
|
||||
def all_terms_and_conditions_already_accepted?
|
||||
|
||||
@@ -10,4 +10,12 @@ class TermsOfService
|
||||
TermsOfServiceFile.updated_at
|
||||
end
|
||||
end
|
||||
|
||||
def self.platform_terms_required?
|
||||
Spree::Config.shoppers_require_tos
|
||||
end
|
||||
|
||||
def self.terms_and_conditions_activated?(distributor)
|
||||
distributor.terms_and_conditions.file?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user