Update terms/privacy links

This commit is contained in:
Hillel Coren 2018-05-09 09:59:21 +03:00
parent e34c7ce44e
commit d1c7849364
6 changed files with 9 additions and 18 deletions

View File

@ -177,16 +177,6 @@ class Utils
return isset($_ENV['RESELLER_TYPE']) ? $_ENV['RESELLER_TYPE'] : false; 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() public static function isOAuthEnabled()
{ {
$providers = [ $providers = [

View File

@ -23,8 +23,9 @@ return [
'exchange_rates_url' => env('EXCHANGE_RATES_URL', 'https://api.fixer.io/latest'), 'exchange_rates_url' => env('EXCHANGE_RATES_URL', 'https://api.fixer.io/latest'),
'exchange_rates_base' => env('EXCHANGE_RATES_BASE', 'EUR'), 'exchange_rates_base' => env('EXCHANGE_RATES_BASE', 'EUR'),
// privacy policy // terms and privacy policy
'privacy_policy_url' => env('PRIVACY_POLICY_URL', ''), '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
'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true), 'google_maps_enabled' => env('GOOGLE_MAPS_ENABLED', true),

View File

@ -236,7 +236,7 @@
}, },
}, },
"content": { "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')) !!}, "message": {!! json_encode(trans('texts.cookie_message')) !!},
"dismiss": {!! json_encode(trans('texts.got_it')) !!}, "dismiss": {!! json_encode(trans('texts.got_it')) !!},
"link": {!! json_encode(trans('texts.learn_more')) !!}, "link": {!! json_encode(trans('texts.learn_more')) !!},

View File

@ -15,10 +15,10 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
{!! Former::checkbox('accepted_terms')->text(trans('texts.agree_to_terms', [ {!! 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) !!} ]))->raw()->value(1) !!}
{!! Former::checkbox('accepted_privacy')->text(trans('texts.agree_to_terms', [ {!! 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) !!} ]))->raw()->value(1) !!}
</div> </div>
</div> </div>

View File

@ -193,14 +193,14 @@ function handleSignedUp() {
->label(' ') ->label(' ')
->value(1) ->value(1)
->text(trans('texts.agree_to_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() !!} ->raw() !!}
{!! Former::checkbox('privacy_checkbox') {!! Former::checkbox('privacy_checkbox')
->label(' ') ->label(' ')
->value(1) ->value(1)
->text(trans('texts.agree_to_terms', [ ->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() !!} ->raw() !!}
<br/> <br/>

View File

@ -80,7 +80,7 @@ FLUSH PRIVILEGES;</pre>
</div> </div>
{!! Former::checkbox('terms_checkbox')->label(' ')->text(trans('texts.agree_to_terms', ['terms' => '<a href="'.NINJA_APP_URL.'/terms" 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').'" target="_blank">'.trans('texts.terms_of_service').'</a>']))->value(1) !!}
{!! Former::actions( Button::primary('Submit')->large()->submit() ) !!} {!! Former::actions( Button::primary('Submit')->large()->submit() ) !!}
{!! Former::close() !!} {!! Former::close() !!}