diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 79bc158a8d9d..8a252eff0742 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -177,16 +177,6 @@ class Utils return isset($_ENV['RESELLER_TYPE']) ? $_ENV['RESELLER_TYPE'] : false; } - public static function getTermsLink() - { - return static::isNinja() ? NINJA_WEB_URL.'/terms' : NINJA_WEB_URL.'/self-hosting-the-invoice-ninja-platform'; - } - - public static function getPrivacyLink() - { - return static::isNinja() ? NINJA_WEB_URL.'/terms' : NINJA_WEB_URL.'/self-hosting-the-invoice-ninja-platform'; - } - public static function isOAuthEnabled() { $providers = [ diff --git a/config/ninja.php b/config/ninja.php index 213dc4952f80..5a75d8cf36d4 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -23,8 +23,9 @@ return [ 'exchange_rates_url' => env('EXCHANGE_RATES_URL', 'https://api.fixer.io/latest'), 'exchange_rates_base' => env('EXCHANGE_RATES_BASE', 'EUR'), - // privacy policy - 'privacy_policy_url' => env('PRIVACY_POLICY_URL', ''), + // terms and privacy policy + 'privacy_policy_url' => env('PRIVACY_POLICY_URL', 'https://www.invoiceninja.com/privacy-policy/'), + 'terms_of_service_url' => env('TERMS_OF_SERVICE_URL', 'https://www.invoiceninja.com/terms/'), // Google maps 'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true), diff --git a/resources/views/master.blade.php b/resources/views/master.blade.php index 2e73c4b71311..1b228c83f613 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -236,7 +236,7 @@ }, }, "content": { - "href": "{{ Utils::isNinja() ? Utils::getPrivacyLink() : (config('ninja.privacy_policy_url') ?: 'https://cookiesandyou.com/' ) }}", + "href": "{{ Utils::isNinja() ? config('ninja.privacy_policy_url') : 'https://cookiesandyou.com/' }}", "message": {!! json_encode(trans('texts.cookie_message')) !!}, "dismiss": {!! json_encode(trans('texts.got_it')) !!}, "link": {!! json_encode(trans('texts.learn_more')) !!}, diff --git a/resources/views/partials/accept_terms.blade.php b/resources/views/partials/accept_terms.blade.php index 956ca6656966..d0c58f8014d5 100644 --- a/resources/views/partials/accept_terms.blade.php +++ b/resources/views/partials/accept_terms.blade.php @@ -15,10 +15,10 @@
{!! Former::checkbox('accepted_terms')->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(Utils::getTermsLink(), trans('texts.terms_of_service'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.terms_of_service_url'), trans('texts.terms_of_service'), ['target' => '_blank']), ]))->raw()->value(1) !!} {!! Former::checkbox('accepted_privacy')->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(Utils::getPrivacyLink(), trans('texts.privacy_policy'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.privacy_policy_url'), trans('texts.privacy_policy'), ['target' => '_blank']), ]))->raw()->value(1) !!}
diff --git a/resources/views/partials/sign_up.blade.php b/resources/views/partials/sign_up.blade.php index 3a0c2d0288a5..5e811e0c8e8b 100644 --- a/resources/views/partials/sign_up.blade.php +++ b/resources/views/partials/sign_up.blade.php @@ -193,14 +193,14 @@ function handleSignedUp() { ->label(' ') ->value(1) ->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(Utils::getTermsLink(), trans('texts.terms_of_service'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.terms_of_service_url'), trans('texts.terms_of_service'), ['target' => '_blank']), ])) ->raw() !!} {!! Former::checkbox('privacy_checkbox') ->label(' ') ->value(1) ->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(Utils::getTermsLink(), trans('texts.privacy_policy'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.privacy_policy_url'), trans('texts.privacy_policy'), ['target' => '_blank']), ])) ->raw() !!}
diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php index 9391079e2547..403a134bc0a3 100644 --- a/resources/views/setup.blade.php +++ b/resources/views/setup.blade.php @@ -80,7 +80,7 @@ FLUSH PRIVILEGES; - {!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').'']))->value(1) !!} + {!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.terms_of_service').'']))->value(1) !!} {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} {!! Former::close() !!}