Don't focus client select if client is already selected

This commit is contained in:
Hillel Coren 2016-05-10 10:44:26 +03:00
parent 12c185ca49
commit 2345ff11ed

View File

@ -925,11 +925,11 @@
})(field); })(field);
} }
@if ($invoice->id || count($clients) == 0) if (model.invoice().client().public_id() || {{ $invoice->id || count($clients) == 0 ? '1' : '0' }}) {
$('#invoice_number').focus(); $('#invoice_number').focus();
@else } else {
$('.client_select input.form-control').focus(); $('.client_select input.form-control').focus();
@endif }
$('#clientModal').on('shown.bs.modal', function () { $('#clientModal').on('shown.bs.modal', function () {
$('#client\\[name\\]').focus(); $('#client\\[name\\]').focus();