Skip to content

A free open source IT asset/license management system

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.

Daniel Meltzer044695cb02d5
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);
}
});