Remove branding if white labeled

This commit is contained in:
Hillel Coren 2016-10-30 18:09:22 +02:00
parent ad6e5cc29d
commit 752e674a34
4 changed files with 29 additions and 15 deletions

View File

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

View File

@ -17,6 +17,7 @@
}
.modal-header h4 {
margin:0;
color:#fff;
}
.modal-header img {
float: left;
@ -89,10 +90,14 @@
{{ Former::populateField('remember', 'true') }}
<div class="modal-header">
<a href="{{ NINJA_WEB_URL }}" target="_blank">
<img src="{{ asset('images/icon-login.png') }}" />
<h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4>
</a>
@if (Utils::isWhiteLabel())
<h4>{{ trans('texts.account_login') }}</h4>
@else
<a href="{{ NINJA_WEB_URL }}" target="_blank">
<img src="{{ asset('images/icon-login.png') }}" />
<h4>Invoice Ninja | {{ trans('texts.account_login') }}</h4>
</a>
@endif
</div>
<div class="inner">
<p>

View File

@ -76,8 +76,15 @@
{!! Former::open('recover_password')->rules(['email' => 'required|email'])->addClass('form-signin') !!}
<div class="modal-header">
<img src="{{ asset('images/icon-login.png') }}" />
<h4>Invoice Ninja | {{ trans('texts.password_recovery') }}</h4></div>
@if (Utils::isWhiteLabel())
<h4>{{ trans('texts.password_recovery') }}</h4>
@else
<a href="{{ NINJA_WEB_URL }}" target="_blank">
<img src="{{ asset('images/icon-login.png') }}" />
</a>
<h4>Invoice Ninja | {{ trans('texts.password_recovery') }}</h4>
@endif
</div>
<div class="inner">
<p>

View File

@ -62,18 +62,11 @@
<div class="container">
<div class="form-signin">
<div class="modal-header">
@if (!isset($account) || !$account->hasFeature(FEATURE_WHITE_LABEL))
<a href="{{ NINJA_WEB_URL }}" target="_blank">
<img src="{{ asset('images/icon-login.png') }}" />
<h4>Invoice Ninja | {{ trans('texts.client_session_expired') }}</h4>
</a>
@else
<h4>{{ trans('texts.session_expired') }}</h4>
@endif
<h4>{{ trans('texts.session_expired') }}</h4>
</div>
<div class="inner">
<div class="alert alert-info">{{ trans('texts.client_session_expired_message') }}</div>
</div>
</div>
</div>
@endsection
@endsection