diff --git a/app/Constants.php b/app/Constants.php index 2bc1a0fdf40e..3b998b2103aa 100644 --- a/app/Constants.php +++ b/app/Constants.php @@ -343,7 +343,7 @@ if (! defined('APP_NAME')) { define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest')); define('NINJA_DATE', '2000-01-01'); define('NINJA_VERSION', '4.4.2' . env('NINJA_VERSION_SUFFIX')); - define('NINJA_TERMS_VERSION', ''); + define('NINJA_TERMS_VERSION', '1.0.1'); define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja')); define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja')); diff --git a/config/ninja.php b/config/ninja.php index 5a75d8cf36d4..630fe11b63a5 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -24,8 +24,15 @@ return [ 'exchange_rates_base' => env('EXCHANGE_RATES_BASE', 'EUR'), // 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/'), + 'terms_of_service_url' => [ + 'hosted' => env('TERMS_OF_SERVICE_URL', 'https://www.invoiceninja.com/terms/'), + 'selfhost' => env('TERMS_OF_SERVICE_URL', 'https://www.invoiceninja.com/self-hosting-terms-service/'), + ], + 'privacy_policy_url' => [ + 'hosted' => env('PRIVACY_POLICY_URL', 'https://www.invoiceninja.com/privacy-policy/'), + 'selfhost' => env('PRIVACY_POLICY_URL', 'https://www.invoiceninja.com/self-hosting-privacy-data-control/'), + ], + // 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 1b228c83f613..5ed394668552 100644 --- a/resources/views/master.blade.php +++ b/resources/views/master.blade.php @@ -236,7 +236,7 @@ }, }, "content": { - "href": "{{ Utils::isNinja() ? config('ninja.privacy_policy_url') : 'https://cookiesandyou.com/' }}", + "href": "{{ Utils::isNinja() ? config('ninja.privacy_policy_url.hosted') : '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 d0c58f8014d5..2a2bb35e55cd 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(config('ninja.terms_of_service_url'), trans('texts.terms_of_service'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.terms_of_service_url.' . (Utils::isSelfHost() ? 'selfhost' : 'hosted')), trans('texts.terms_of_service'), ['target' => '_blank']), ]))->raw()->value(1) !!} {!! Former::checkbox('accepted_privacy')->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(config('ninja.privacy_policy_url'), trans('texts.privacy_policy'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.privacy_policy_url.' . (Utils::isSelfHost() ? 'selfhost' : 'hosted')), 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 5e811e0c8e8b..2d927eb1f8be 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(config('ninja.terms_of_service_url'), trans('texts.terms_of_service'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.terms_of_service_url.' . (Utils::isSelfHost() ? 'selfhost' : 'hosted')), trans('texts.terms_of_service'), ['target' => '_blank']), ])) ->raw() !!} {!! Former::checkbox('privacy_checkbox') ->label(' ') ->value(1) ->text(trans('texts.agree_to_terms', [ - 'terms' => link_to(config('ninja.privacy_policy_url'), trans('texts.privacy_policy'), ['target' => '_blank']), + 'terms' => link_to(config('ninja.privacy_policy_url.' . (Utils::isSelfHost() ? 'selfhost' : 'hosted')), trans('texts.privacy_policy'), ['target' => '_blank']), ])) ->raw() !!}
diff --git a/resources/views/setup.blade.php b/resources/views/setup.blade.php index 403a134bc0a3..9ebf71fedd15 100644 --- a/resources/views/setup.blade.php +++ b/resources/views/setup.blade.php @@ -60,7 +60,8 @@ FLUSH PRIVILEGES; 'last_name' => 'required', 'email' => 'required|email', 'password' => 'required', - 'terms_checkbox' => 'required' + 'terms_checkbox' => 'required', + 'privacy_checkbox' => 'required' ]) !!}
@@ -80,7 +81,8 @@ 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::checkbox('privacy_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => ''.trans('texts.privacy_policy').'']))->value(1) !!} {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} {!! Former::close() !!}