From 8ff7b7fd21a124ba42bedb262efacc14ffb22284 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 19 Nov 2017 19:52:28 +0200 Subject: [PATCH] Update edit client layout --- app/Ninja/Presenters/ClientPresenter.php | 6 ++- resources/lang/en/texts.php | 1 + resources/views/clients/edit.blade.php | 65 ++++++++++++++++-------- 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/app/Ninja/Presenters/ClientPresenter.php b/app/Ninja/Presenters/ClientPresenter.php index d66c490b28..d2f3ba553a 100644 --- a/app/Ninja/Presenters/ClientPresenter.php +++ b/app/Ninja/Presenters/ClientPresenter.php @@ -95,7 +95,11 @@ class ClientPresenter extends EntityPresenter $state = e($client->{$prefix . 'state'}); $postalCode = e($client->{$prefix . 'post_code'}); - return Utils::cityStateZip($city, $state, $postalCode, $swap); + if ($city || $state || $postalCode) { + return Utils::cityStateZip($city, $state, $postalCode, $swap); + } else { + return false; + } } diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index bf0962a59a..bc9818114b 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -2540,6 +2540,7 @@ $LANG = array( 'shipping_state' => 'Shipping State/Province', 'shipping_postal_code' => 'Shipping Postal Code', 'shipping_country' => 'Shipping Country', + 'classify' => 'Classify', ); diff --git a/resources/views/clients/edit.blade.php b/resources/views/clients/edit.blade.php index 38fd0fbae5..29e23538e0 100644 --- a/resources/views/clients/edit.blade.php +++ b/resources/views/clients/edit.blade.php @@ -163,33 +163,54 @@ -
+

{!! trans('texts.additional_info') !!}

- {!! Former::select('currency_id')->addOption('','') - ->placeholder($account->currency ? $account->currency->name : '') - ->fromQuery($currencies, 'name', 'id') !!} - {!! Former::select('language_id')->addOption('','') - ->placeholder($account->language ? trans('texts.lang_'.$account->language->name) : '') - ->fromQuery($languages, 'name', 'id') !!} - {!! Former::select('payment_terms')->addOption('','') - ->fromQuery(\App\Models\PaymentTerm::getSelectOptions(), 'name', 'num_days') - ->placeholder($account->present()->paymentTerms) - ->help(trans('texts.payment_terms_help')) !!} - @if ($account->isModuleEnabled(ENTITY_TASK)) - {!! Former::text('task_rate') - ->placeholder($account->present()->taskRate) - ->help('task_rate_help') !!} - @endif - {!! Former::select('size_id')->addOption('','') - ->fromQuery($sizes, 'name', 'id') !!} - {!! Former::select('industry_id')->addOption('','') - ->fromQuery($industries, 'name', 'id') !!} - {!! Former::textarea('public_notes') !!} - {!! Former::textarea('private_notes') !!} +
+ +
+
+
+ {!! Former::select('currency_id')->addOption('','') + ->placeholder($account->currency ? $account->currency->name : '') + ->fromQuery($currencies, 'name', 'id') !!} + {!! Former::select('language_id')->addOption('','') + ->placeholder($account->language ? trans('texts.lang_'.$account->language->name) : '') + ->fromQuery($languages, 'name', 'id') !!} + {!! Former::select('payment_terms')->addOption('','') + ->fromQuery(\App\Models\PaymentTerm::getSelectOptions(), 'name', 'num_days') + ->placeholder($account->present()->paymentTerms) + ->help(trans('texts.payment_terms_help') . ' | ' . link_to('/settings/payment_terms', trans('texts.customize_options'))) !!} + @if ($account->isModuleEnabled(ENTITY_TASK)) + {!! Former::text('task_rate') + ->placeholder($account->present()->taskRate) + ->help('task_rate_help') !!} + @endif +
+
+ {!! Former::textarea('public_notes')->rows(6) !!} + {!! Former::textarea('private_notes')->rows(6) !!} +
+
+ {!! Former::select('size_id')->addOption('','') + ->fromQuery($sizes, 'name', 'id') !!} + {!! Former::select('industry_id')->addOption('','') + ->fromQuery($industries, 'name', 'id') !!} +
+