From ffcff14c266fa800e89c5bd39b4ec54c9486a78e Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 23 Apr 2014 16:02:24 +0300 Subject: [PATCH] Bug fixes --- app/libraries/utils.php | 5 +++++ app/views/invoices/edit.blade.php | 2 ++ 2 files changed, 7 insertions(+) diff --git a/app/libraries/utils.php b/app/libraries/utils.php index 0b59483461..c0fe155957 100755 --- a/app/libraries/utils.php +++ b/app/libraries/utils.php @@ -7,6 +7,11 @@ class Utils return Auth::check() && Auth::user()->registered; } + public static function isConfirmed() + { + return Auth::check() && Auth::user()->confirmed; + } + public static function isProd() { return App::environment() == ENV_PRODUCTION; diff --git a/app/views/invoices/edit.blade.php b/app/views/invoices/edit.blade.php index b04f3953ec..8d3055a51f 100755 --- a/app/views/invoices/edit.blade.php +++ b/app/views/invoices/edit.blade.php @@ -1254,9 +1254,11 @@ } str += self.email(); + @if (Utils::isConfirmed()) if (self.invitation_link()) { str += '
{{ trans('texts.view_invoice') }}'; } + @endif return str; });