mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Added warning for token mismatch error
This commit is contained in:
parent
19d5d49e63
commit
5547f222e1
@ -46,6 +46,14 @@ class Handler extends ExceptionHandler {
|
|||||||
{
|
{
|
||||||
if ($e instanceof ModelNotFoundException) {
|
if ($e instanceof ModelNotFoundException) {
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
|
} elseif ($e instanceof \Illuminate\Session\TokenMismatchException) {
|
||||||
|
// https://gist.github.com/jrmadsen67/bd0f9ad0ef1ed6bb594e
|
||||||
|
return redirect()
|
||||||
|
->back()
|
||||||
|
->withInput($request->except('password', '_token'))
|
||||||
|
->with([
|
||||||
|
'warning' => trans('texts.token_expired')
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// In production, except for maintenance mode, we'll show a custom error screen
|
// In production, except for maintenance mode, we'll show a custom error screen
|
||||||
|
@ -975,6 +975,6 @@ return array(
|
|||||||
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
'custom_invoice_charges_helps' => 'Add a text input to the invoice create/edit page and include the charge in the invoice subtotals.',
|
||||||
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
'color_help' => 'Note: the primary color is also used in the client portal and custom email designs.',
|
||||||
|
|
||||||
|
'token_expired' => 'Validation token was expired. Please try again.',
|
||||||
|
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user