From 040fb76a48b4473ef9c7586881b8653976509abd Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 20 Oct 2016 21:35:59 +0300 Subject: [PATCH] UI to apply white label license --- app/Http/Middleware/StartupCheck.php | 2 ++ resources/lang/en/texts.php | 6 ++++ resources/views/header.blade.php | 50 +--------------------------- 3 files changed, 9 insertions(+), 49 deletions(-) diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index 1aee1c59b8fc..732013165732 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -154,6 +154,8 @@ class StartupCheck $company->save(); Session::flash('message', trans('texts.bought_white_label')); + } else { + Session::flash('error', trans('texts.invalid_white_label_license')); } } } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 293d38554819..2bc00fe5a916 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2163,6 +2163,12 @@ $LANG = array( 'currency_symbol' => 'Symbol', 'currency_code' => 'Code', + 'buy_license' => 'Buy License', + 'apply_license' => 'Apply License', + 'submit' => 'Submit', + 'white_label_license_key' => 'License Key', + 'invalid_white_label_license' => 'The white label license is not valid', + ); return $LANG; diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php index baaf6388caee..c1abad167b1d 100644 --- a/resources/views/header.blade.php +++ b/resources/views/header.blade.php @@ -142,10 +142,6 @@ $('#signUpModal').modal('hide'); } - function buyProduct(affiliateKey, productId) { - window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/license?affiliate_key=' + affiliateKey + '&product_id=' + productId + '&return_url=' + window.location); - } - function hideMessage() { $('.alert-info').fadeOut(); $.get('/hide_message', function(response) { @@ -603,51 +599,7 @@ ]) !!} @endif @else - {{ trans('texts.powered_by') }} - {{-- Per our license, please do not remove or modify this section. --}} - {!! link_to('https://www.invoiceninja.com/?utm_source=powered_by', 'InvoiceNinja.com', ['target' => '_blank', 'title' => 'invoiceninja.com']) !!} - - {!! link_to(RELEASES_URL, 'v' . NINJA_VERSION, ['target' => '_blank', 'title' => trans('texts.trello_roadmap')]) !!} | - @if (Auth::user()->account->hasFeature(FEATURE_WHITE_LABEL)) - {{ trans('texts.white_labeled') }} - @else - {{ trans('texts.white_label_link') }} - - - @endif - + @include('partials.white_label') @endif