From 752e674a3419c3b091741b69df7c95a2001e3e2d Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 30 Oct 2016 18:09:22 +0200 Subject: [PATCH] Remove branding if white labeled --- app/Libraries/Utils.php | 9 +++++++++ resources/views/auth/login.blade.php | 13 +++++++++---- resources/views/auth/password.blade.php | 11 +++++++++-- resources/views/clientauth/sessionexpired.blade.php | 11 ++--------- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 88567ad27741..0b3984acc207 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -92,6 +92,15 @@ class Utils return Utils::getResllerType() ? true : false; } + public static function isWhiteLabel() + { + if (Utils::isNinjaProd()) { + return false; + } + + return \App\Models\Account::first()->hasFeature(FEATURE_WHITE_LABEL); + } + public static function getResllerType() { return isset($_ENV['RESELLER_TYPE']) ? $_ENV['RESELLER_TYPE'] : false; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index df4324723a97..6ea0973c2f03 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -17,6 +17,7 @@ } .modal-header h4 { margin:0; + color:#fff; } .modal-header img { float: left; @@ -89,10 +90,14 @@ {{ Former::populateField('remember', 'true') }}

diff --git a/resources/views/auth/password.blade.php b/resources/views/auth/password.blade.php index 8106b4762eb0..4cd20002c2f4 100644 --- a/resources/views/auth/password.blade.php +++ b/resources/views/auth/password.blade.php @@ -76,8 +76,15 @@ {!! Former::open('recover_password')->rules(['email' => 'required|email'])->addClass('form-signin') !!}

+ @if (Utils::isWhiteLabel()) +

{{ trans('texts.password_recovery') }}

+ @else + + + +

Invoice Ninja | {{ trans('texts.password_recovery') }}

+ @endif +

diff --git a/resources/views/clientauth/sessionexpired.blade.php b/resources/views/clientauth/sessionexpired.blade.php index 1fca7a79b4a7..86a1c26c046a 100644 --- a/resources/views/clientauth/sessionexpired.blade.php +++ b/resources/views/clientauth/sessionexpired.blade.php @@ -62,18 +62,11 @@

-@endsection \ No newline at end of file +@endsection