From 2345ff11ed482d457fb856819485d22ec1d60aa3 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 10 May 2016 10:44:26 +0300 Subject: [PATCH] Don't focus client select if client is already selected --- resources/views/invoices/edit.blade.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 904acc840869..09be1ed4134e 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -925,11 +925,11 @@ })(field); } - @if ($invoice->id || count($clients) == 0) - $('#invoice_number').focus(); - @else - $('.client_select input.form-control').focus(); - @endif + if (model.invoice().client().public_id() || {{ $invoice->id || count($clients) == 0 ? '1' : '0' }}) { + $('#invoice_number').focus(); + } else { + $('.client_select input.form-control').focus(); + } $('#clientModal').on('shown.bs.modal', function () { $('#client\\[name\\]').focus();