From 044695cb02d59a0de62dd74b8bef37239d865a91 Mon Sep 17 00:00:00 2001 From: Daniel Meltzer Date: Thu, 9 Jun 2016 20:28:49 -0500 Subject: [PATCH] Fix hardware creation error making old input disappear. This should be redone to dynamically update on the client side based on a JSON response instead of flashing and reloading, but that's a lot of change for v3 at this point. --- app/Http/Requests/AssetRequest.php | 3 +-- resources/views/hardware/edit.blade.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/Http/Requests/AssetRequest.php b/app/Http/Requests/AssetRequest.php index ca3360997a..79c5218331 100644 --- a/app/Http/Requests/AssetRequest.php +++ b/app/Http/Requests/AssetRequest.php @@ -55,8 +55,7 @@ class AssetRequest extends Request { $this->session()->flash('errors', Session::get('errors', new \Illuminate\Support\ViewErrorBag) ->put('default', new \Illuminate\Support\MessageBag($errors))); - + \Input::flash(); return parent::response($errors); - // return $this->redirector->back()->withInput()->withErrors($errors, $this->errorBag); } } diff --git a/resources/views/hardware/edit.blade.php b/resources/views/hardware/edit.blade.php index 73cbcc4726..c03bc42363 100755 --- a/resources/views/hardware/edit.blade.php +++ b/resources/views/hardware/edit.blade.php @@ -515,7 +515,7 @@ $(function () { }, error: function(data) { // AssetRequest Validator will flash all errors to session, this just refreshes to see them. - window.location.reload(); + window.location.reload(true); } });