Update privacy/terms links

This commit is contained in:
Hillel Coren 2018-05-09 12:25:41 +03:00
parent c35e91b686
commit 2333e1cf2a
6 changed files with 19 additions and 10 deletions

View File

@ -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'));

View File

@ -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),

View File

@ -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')) !!},

View File

@ -15,10 +15,10 @@
<div class="panel panel-default">
<div class="panel-body">
{!! 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) !!}
</div>
</div>

View File

@ -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() !!}
<br/>

View File

@ -60,7 +60,8 @@ FLUSH PRIVILEGES;</pre>
'last_name' => 'required',
'email' => 'required|email',
'password' => 'required',
'terms_checkbox' => 'required'
'terms_checkbox' => 'required',
'privacy_checkbox' => 'required'
]) !!}
<div style="display:{{ env('PRECONFIGURED_INSTALL') ? 'none' : 'block' }}">
@ -80,7 +81,8 @@ FLUSH PRIVILEGES;</pre>
</div>
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.config('ninja.terms_of_service_url').'" target="_blank">'.trans('texts.terms_of_service').'</a>']))->value(1) !!}
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.config('ninja.terms_of_service_url.selfhost').'" target="_blank">'.trans('texts.terms_of_service').'</a>']))->value(1) !!}
{!! Former::checkbox('privacy_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.config('ninja.privacy_policy_url.selfhost').'" target="_blank">'.trans('texts.privacy_policy').'</a>']))->value(1) !!}
{!! Former::actions( Button::primary('Submit')->large()->submit() ) !!}
{!! Former::close() !!}