diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php
index 616b26302ab4..571ac731938c 100644
--- a/app/Http/Controllers/HomeController.php
+++ b/app/Http/Controllers/HomeController.php
@@ -98,6 +98,6 @@ class HomeController extends BaseController
public function keepAlive()
{
- return Auth::check() ? RESULT_SUCCESS : RESULT_FAILURE;
+ return RESULT_SUCCESS;
}
}
diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php
index 3545b548f611..7e7b659f850a 100644
--- a/app/Http/Controllers/InvoiceController.php
+++ b/app/Http/Controllers/InvoiceController.php
@@ -1,6 +1,5 @@
abort(404);
}
$invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first();
@@ -109,7 +108,6 @@ class InvoiceController extends BaseController
public function getClientDatatable()
{
- //$accountId = Auth::user()->account_id;
$search = Input::get('sSearch');
$invitationKey = Session::get('invitation_key');
$invitation = Invitation::where('invitation_key', '=', $invitationKey)->first();
@@ -177,13 +175,13 @@ class InvoiceController extends BaseController
$invitation = Invitation::where('invitation_key', '=', $invitationKey)->first();
if (!$invitation) {
- App::abort(404, trans('texts.invoice_not_found'));
+ app()->abort(404, trans('texts.invoice_not_found'));
}
$invoice = $invitation->invoice;
if (!$invoice || $invoice->is_deleted) {
- App::abort(404, trans('texts.invoice_not_found'));
+ app()->abort(404, trans('texts.invoice_not_found'));
}
$invoice->load('user', 'invoice_items', 'invoice_design', 'account.country', 'client.contacts', 'client.country');
@@ -191,7 +189,7 @@ class InvoiceController extends BaseController
$account = $client->account;
if (!$client || $client->is_deleted) {
- App::abort(404, trans('texts.invoice_not_found'));
+ app()->abort(404, trans('texts.invoice_not_found'));
}
if ($account->subdomain) {
diff --git a/app/Http/Controllers/PaymentController.php b/app/Http/Controllers/PaymentController.php
index 530a1b5bc5cc..0c64ef15b6dd 100644
--- a/app/Http/Controllers/PaymentController.php
+++ b/app/Http/Controllers/PaymentController.php
@@ -51,7 +51,7 @@ class PaymentController extends BaseController
{
$invitationKey = Session::get('invitation_key');
if (!$invitationKey) {
- return Redirect::to('/setup');
+ app()->abort(404);
}
$invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first();
diff --git a/app/Http/Controllers/QuoteController.php b/app/Http/Controllers/QuoteController.php
index d6a9e31ce05c..07acaa7eb0b0 100644
--- a/app/Http/Controllers/QuoteController.php
+++ b/app/Http/Controllers/QuoteController.php
@@ -71,7 +71,7 @@ class QuoteController extends BaseController
{
$invitationKey = Session::get('invitation_key');
if (!$invitationKey) {
- return Redirect::to('/setup');
+ app()->abort(404);
}
$invitation = Invitation::with('account')->where('invitation_key', '=', $invitationKey)->first();
diff --git a/app/Ninja/Mailers/ContactMailer.php b/app/Ninja/Mailers/ContactMailer.php
index 3dc5305c4861..35af63248360 100644
--- a/app/Ninja/Mailers/ContactMailer.php
+++ b/app/Ninja/Mailers/ContactMailer.php
@@ -169,6 +169,7 @@ class ContactMailer extends Mailer
'$client' => $data['client']->getDisplayName(),
'$account' => $data['account']->getDisplayName(),
'$contact' => $data['invitation']->contact->getDisplayName(),
+ '$firstName' => $data['invitation']->contact->first_name,
'$amount' => Utils::formatMoney($data['amount'], $data['client']->getCurrencyId()),
'$invoice' => $data['invitation']->invoice->invoice_number,
'$quote' => $data['invitation']->invoice->invoice_number,
diff --git a/resources/views/accounts/templates_and_reminders.blade.php b/resources/views/accounts/templates_and_reminders.blade.php
index 5af32b5efb61..347a0c81b435 100644
--- a/resources/views/accounts/templates_and_reminders.blade.php
+++ b/resources/views/accounts/templates_and_reminders.blade.php
@@ -145,6 +145,7 @@
'amount',
'link',
'contact',
+ 'firstName',
'invoice',
'quote'
];
@@ -156,6 +157,7 @@
formatMoney(100),
"{{ Auth::user()->account->getSiteUrl() . '...' }}",
"Contact Name",
+ "First Name",
"0001",
"0001"
];
diff --git a/resources/views/header.blade.php b/resources/views/header.blade.php
index 2b41dc21431d..8098a95808c4 100644
--- a/resources/views/header.blade.php
+++ b/resources/views/header.blade.php
@@ -235,36 +235,7 @@
@endif
}
-
- var redirectTimer = null;
- function startWarnSessionTimeout() {
- var oneMinute = 1000 * 60;
- var twoMinutes = oneMinute * 2;
- var twoHours = oneMinute * 120;
- setTimeout(function() {
- warnSessionExpring();
- }, (twoHours - twoMinutes));
- }
-
- function warnSessionExpring() {
- $("#keepAliveDiv").fadeIn();
- redirectTimer = setTimeout(function() {
- NINJA.formIsChanged = false;
- window.location = '{{ URL::to('/dashboard') }}';
- }, 1000 * 60);
- }
-
- // keep the token cookie valid to prevent token mismatch errors
- function keepAlive() {
- clearTimeout(redirectTimer);
- $('#keepAliveDiv').fadeOut();
- $.get('{{ URL::to('/keep_alive') }}');
- startWarnSessionTimeout();
- }
-
$(function() {
- startWarnSessionTimeout();
-
window.setTimeout(function() {
$(".alert-hide").fadeOut();
}, 3000);
@@ -495,14 +466,10 @@
-
-
-