From 1dee791077432a143dc749ce9bdcc75cf91e661f Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 25 Apr 2018 13:10:26 +0300 Subject: [PATCH] Check for map API key to show lookup placeholder --- resources/views/clients/edit.blade.php | 6 +++--- resources/views/vendors/edit.blade.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/clients/edit.blade.php b/resources/views/clients/edit.blade.php index 510165457175..04fae6756d6d 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') - ->onchange(config('ninja.google_maps_enabled') ? 'lookupPostalCode()' : '') !!} + ->onchange(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') - ->onchange(config('ninja.google_maps_enabled') ? 'lookupPostalCode(true)' : '') + ->onchange(config('ninja.google_maps_api_key') ? 'lookupPostalCode(true)' : '') ->label('postal_code') !!} {!! Former::select('shipping_country_id')->addOption('','') ->fromQuery($countries, 'name', 'id')->label('country_id') !!} diff --git a/resources/views/vendors/edit.blade.php b/resources/views/vendors/edit.blade.php index 743a4562bd71..3628d18c100a 100644 --- a/resources/views/vendors/edit.blade.php +++ b/resources/views/vendors/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 @@ -65,7 +65,7 @@ {!! Former::text('state') !!} {!! Former::text('postal_code') - ->onchange(config('ninja.google_maps_enabled') ? 'lookupPostalCode()' : '') !!} + ->onchange(config('ninja.google_maps_api_key') ? 'lookupPostalCode()' : '') !!} {!! Former::select('country_id')->addOption('','') ->fromQuery($countries, 'name', 'id') !!}