From a821032105bcffc4ba8530b4ee85ff808251d644 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 29 Apr 2018 10:38:05 +0300 Subject: [PATCH] Check for pro plan for client messages --- resources/views/clients/edit.blade.php | 30 +++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/resources/views/clients/edit.blade.php b/resources/views/clients/edit.blade.php index e19db323941f..42124b5afaf8 100644 --- a/resources/views/clients/edit.blade.php +++ b/resources/views/clients/edit.blade.php @@ -5,7 +5,7 @@ @stop @section('head') - @if (config('ninja.google_maps_enabled')) + @if (config('ninja.google_maps_api_key')) @include('partials.google_geocode') @endif @stop @@ -94,7 +94,7 @@ {!! Former::text('city') !!} {!! Former::text('state') !!} {!! Former::text('postal_code') - ->oninput(config('ninja.google_maps_enabled') ? 'lookupPostalCode()' : '') !!} + ->oninput(config('ninja.google_maps_api_key') ? 'lookupPostalCode()' : '') !!} {!! Former::select('country_id')->addOption('','') ->fromQuery($countries, 'name', 'id') !!} @@ -112,7 +112,7 @@ {!! Former::text('shipping_city')->label('city') !!} {!! Former::text('shipping_state')->label('state') !!} {!! Former::text('shipping_postal_code') - ->oninput(config('ninja.google_maps_enabled') ? 'lookupPostalCode(true)' : '') + ->oninput(config('ninja.google_maps_api_key') ? 'lookupPostalCode(true)' : '') ->label('postal_code') !!} {!! Former::select('shipping_country_id')->addOption('','') ->fromQuery($countries, 'name', 'id')->label('country_id') !!} @@ -204,9 +204,11 @@
  • {{ trans('texts.notes') }}
  • -
  • - {{ trans('texts.messages') }} -
  • + @if (Utils::isPro()) +
  • + {{ trans('texts.messages') }} +
  • + @endif
  • {{ trans('texts.classify') }}
  • @@ -244,13 +246,15 @@ {!! Former::textarea('public_notes')->rows(6) !!} {!! Former::textarea('private_notes')->rows(6) !!} -
    - @foreach (App\Models\Account::$customMessageTypes as $type) - {!! Former::textarea('custom_messages[' . $type . ']') - ->placeholder($account->customMessage($type)) - ->label($type) !!} - @endforeach -
    + @if (Utils::isPro()) +
    + @foreach (App\Models\Account::$customMessageTypes as $type) + {!! Former::textarea('custom_messages[' . $type . ']') + ->placeholder($account->customMessage($type)) + ->label($type) !!} + @endforeach +
    + @endif
    {!! Former::select('size_id')->addOption('','') ->fromQuery($sizes, 'name', 'id') !!}