Moved the footer TOS URL from the content settings to the new section legal settings in the global settings

This commit is contained in:
luisramos0
2018-07-20 15:20:26 +01:00
committed by Maikel Linke
parent d920c32376
commit ca35c59e52
8 changed files with 8 additions and 6 deletions

View File

@@ -8,7 +8,7 @@ module Admin
{name: I18n.t('admin.contents.edit.group_signup_page'), preferences: [:group_signup_pricing_table_html, :group_signup_case_studies_html, :group_signup_detail_html]},
{name: I18n.t('admin.contents.edit.footer_and_external_links'), preferences: [:footer_logo,
:footer_facebook_url, :footer_twitter_url, :footer_instagram_url, :footer_linkedin_url, :footer_googleplus_url, :footer_pinterest_url,
:footer_email, :community_forum_url, :footer_links_md, :footer_about_url, :footer_tos_url]}]
:footer_email, :community_forum_url, :footer_links_md, :footer_about_url]}]
end
def update

View File

@@ -53,5 +53,4 @@ class ContentConfiguration < Spree::Preferences::FileConfiguration
EOS
preference :footer_about_url, :string, default: "http://www.openfoodnetwork.org/ofn-local/open-food-network-australia/"
preference :footer_tos_url, :string, default: "/Terms-of-service.pdf"
end

View File

@@ -9,6 +9,7 @@ Spree::AppConfiguration.class_eval do
preference :embedded_shopfronts_whitelist, :text, default: nil
# Legal Preferences
preference :footer_tos_url, :string, default: "/Terms-of-service.pdf"
preference :enterprises_require_tos, :boolean, default: false
preference :privacy_policy_url, :string, default: nil
preference :cookies_consent_banner_toggle, :boolean, default: false

View File

@@ -2,6 +2,9 @@
%fieldset.legal.no-border-bottom
%legend{:align => "center"}= t('.legal_settings')
.field
= label_tag(:footer_tos_url, t(:footer_tos_url)) + tag(:br)
= preference_field_tag(:footer_tos_url, Spree::Config[:footer_tos_url], type: Spree::Config.preference_type(:footer_tos_url))
.field
= preference_field_tag(:enterprises_require_tos, Spree::Config[:enterprises_require_tos], :type => Spree::Config.preference_type(:enterprises_require_tos))
= label_tag(:enterprises_require_tos, t('.enterprises_require_tos')) + tag(:br)

View File

@@ -42,7 +42,7 @@
%tr
%td{:align => "center"}
%p
%a{:href => "#{ URI.join(spree.root_url, ContentConfig.footer_tos_url).to_s }", :target => "_blank"}
%a{:href => "#{ URI.join(spree.root_url, Spree::Config.footer_tos_url).to_s }", :target => "_blank"}
= t :terms_of_service
|
%a{:href => "#{ spree.root_url }"}

View File

@@ -37,7 +37,7 @@
.small-12.medium-6.columns{'ng-hide' => '!tos_required' }
%p.tos-message
#{t(:enterprise_tos_message)}
%a{href: ContentConfig.footer_tos_url, target: "_blank" } #{t(:enterprise_tos_link_text)}
%a{href: Spree::Config.footer_tos_url, target: "_blank" } #{t(:enterprise_tos_link_text)}
%p.tos-checkbox
%input{ type: 'checkbox', name: 'accept_terms', id: 'accept_terms', ng: { model: "tos_accepted" } }
%label{for: "accept_terms"} #{t(:enterprise_tos_agree)}

View File

@@ -131,7 +131,7 @@
.small-12.medium-5.columns.text-left
%p.text-small
= t '.footer_legal_call'
%a{href: ContentConfig.footer_tos_url}
%a{href: Spree::Config.footer_tos_url, target: "_blank"}
= t '.footer_legal_tos'
&#124;
= t '.footer_legal_visit'

View File

@@ -1183,7 +1183,6 @@ en:
footer_email: "Email"
footer_links_md: "Links"
footer_about_url: "About URL"
footer_tos_url: "Terms of Service URL"
name: Name
first_name: First Name