From a4960245c2d759d7cf57ec94dd24b0d6c137dee7 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Thu, 15 Oct 2015 09:19:41 +0300 Subject: [PATCH] Bug fixes --- app/Http/Controllers/InvoiceController.php | 4 ++-- app/Http/routes.php | 7 ------- app/Libraries/Utils.php | 4 ++++ public/css/built.css | 3 +++ public/css/built.public.css | 4 +++- public/css/public.style.css | 4 +++- public/css/style.css | 3 +++ resources/views/accounts/invoice_design.blade.php | 6 +++--- resources/views/invoices/edit.blade.php | 4 ++-- 9 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index 1c20642d8795..36c616321a7d 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -443,8 +443,8 @@ class InvoiceController extends BaseController // check if we created a new client with the invoice if ($input->invoice->client->public_id == '-1') { $message = $message.' '.trans('texts.and_created_client'); - $url = URL::to('clients/'.$input->invoice->client->public_id); - Utils::trackViewed($client->getDisplayName(), ENTITY_CLIENT, $url); + $trackUrl = URL::to('clients/'.$invoice->client->public_id); + Utils::trackViewed($invoice->client->getDisplayName(), ENTITY_CLIENT, $trackUrl); } if ($action == 'clone') { diff --git a/app/Http/routes.php b/app/Http/routes.php index 239bb7ca0f13..436b12bf032a 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -72,13 +72,6 @@ Route::post('hook/email_opened', 'AppController@emailOpened'); // Laravel auth routes -/* -Route::controllers([ - 'auth' => 'Auth\AuthController', - 'password' => 'Auth\PasswordController', -]); -*/ - get('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@getRegister')); post('/signup', array('as' => 'signup', 'uses' => 'Auth\AuthController@postRegister')); get('/login', array('as' => 'login', 'uses' => 'Auth\AuthController@getLoginWrapper')); diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index 65cbfb645a24..adbd5bcff17f 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -259,6 +259,10 @@ class Utils public static function dateToString($date) { + if (!$date) { + return false; + } + $dateTime = new DateTime($date); $timestamp = $dateTime->getTimestamp(); $format = Session::get(SESSION_DATE_FORMAT, DEFAULT_DATE_FORMAT); diff --git a/public/css/built.css b/public/css/built.css index 869fab71b8b0..c38513509c69 100644 --- a/public/css/built.css +++ b/public/css/built.css @@ -2352,6 +2352,9 @@ body { background: #f8f8f8 !important; font-family: 'Roboto', sans-serif; font-size: 15px; } +html { + overflow-y: scroll; +} .bold { font-weight: 700; } a {color:#0b4d78;} /*a:hover { text-decoration: none; color: #0a3857;}*/ diff --git a/public/css/built.public.css b/public/css/built.public.css index ad95f70da8ae..0858e54bb29b 100644 --- a/public/css/built.public.css +++ b/public/css/built.public.css @@ -785,7 +785,9 @@ body { font-size: 14px; background-color: #f8f8f8; } - +html { + overflow-y: scroll; +} @media screen and (min-width: 700px) { .navbar-header { diff --git a/public/css/public.style.css b/public/css/public.style.css index 59444f3e8b69..677293c83468 100644 --- a/public/css/public.style.css +++ b/public/css/public.style.css @@ -3,7 +3,9 @@ body { font-size: 14px; background-color: #f8f8f8; } - +html { + overflow-y: scroll; +} @media screen and (min-width: 700px) { .navbar-header { diff --git a/public/css/style.css b/public/css/style.css index 3e6e3d01fa9d..db54a785c033 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -2,6 +2,9 @@ body { background: #f8f8f8 !important; font-family: 'Roboto', sans-serif; font-size: 15px; } +html { + overflow-y: scroll; +} .bold { font-weight: 700; } a {color:#0b4d78;} /*a:hover { text-decoration: none; color: #0a3857;}*/ diff --git a/resources/views/accounts/invoice_design.blade.php b/resources/views/accounts/invoice_design.blade.php index abe3efd67a74..c76520bd94a1 100644 --- a/resources/views/accounts/invoice_design.blade.php +++ b/resources/views/accounts/invoice_design.blade.php @@ -95,12 +95,12 @@ @if (!Utils::isPro() || \App\Models\InvoiceDesign::count() == COUNT_FREE_DESIGNS_SELF_HOST) - {!! Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id')->addOption(trans('texts.more_designs') . '...', '-1') !!} + {!! Former::select('invoice_design_id')->style('display:inline')->fromQuery($invoiceDesigns, 'name', 'id')->addOption(trans('texts.more_designs') . '...', '-1') !!} @else - {!! Former::select('invoice_design_id')->style('display:inline;width:120px')->fromQuery($invoiceDesigns, 'name', 'id') !!} + {!! Former::select('invoice_design_id')->style('display:inline')->fromQuery($invoiceDesigns, 'name', 'id') !!} @endif - {!! Former::text('font_size')->type('number')->min('0')->step('1')->style('width:120px') !!} + {!! Former::text('font_size')->type('number')->min('0')->step('1') !!} {!! Former::text('primary_color') !!} {!! Former::text('secondary_color') !!} diff --git a/resources/views/invoices/edit.blade.php b/resources/views/invoices/edit.blade.php index 593745585cb5..7741ca4ce732 100644 --- a/resources/views/invoices/edit.blade.php +++ b/resources/views/invoices/edit.blade.php @@ -18,7 +18,7 @@
  • {!! link_to('invoices', trans('texts.recurring_invoice')) !!}
  • @else
  • {!! link_to(($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'), trans('texts.' . ($entityType == ENTITY_QUOTE ? 'quotes' : 'invoices'))) !!}
  • -
  • {{ $invoice->invoice_number }}
  • +
  • {{ $invoice->invoice_number }}
  • @endif @endif @@ -115,7 +115,7 @@ @elseif ($invoice && isset($lastSent) && $lastSent)
    - {!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, Utils::dateToString($invoice->last_sent_date), ['id' => 'lastSent'])]) !!} + {!! trans('texts.last_sent_on', ['date' => link_to('/invoices/'.$lastSent->public_id, $invoice->last_sent_date, ['id' => 'lastSent'])]) !!}
    @endif @endif