A free open source IT asset/license management system
Modify genericActionsFormatter restore link to be a button instead since it's in a form. Changed user restore route to POST
Mike Roquemore123963c14ce4
diff --git a/resources/views/partials/bootstrap-table.blade.php b/resources/views/partials/bootstrap-table.blade.phpindex 2f019e7c1a..67ffafcdf6 100644--- a/resources/views/partials/bootstrap-table.blade.php+++ b/resources/views/partials/bootstrap-table.blade.php@@ -282,7 +282,7 @@if ((row.available_actions) && (row.available_actions.restore === true)) {actions += '<form style="display: inline;" method="POST" action="{{ url('/') }}/' + dest + '/' + row.id + '/restore"> ';actions += '@csrf';- actions += '<a href="{{ url('/') }}/' + dest + '/' + row.id + '/restore" class="btn btn-sm btn-warning" data-toggle="tooltip" title="{{ trans('general.restore') }}"><i class="far fa-clone"></i></a> ';+ actions += '<button class="btn btn-sm btn-warning" data-toggle="tooltip" title="{{ trans('general.restore') }}"><i class="far fa-clone"></i></button> ';actions += '<i class="fa fa-retweet" aria-hidden="true"></i><span class="sr-only">{{ trans('general.restore') }}</span></button></form> ';}@@ -780,4 +780,4 @@</script>-@endpush+@endpush\ No newline at end of filediff --git a/routes/web/users.php b/routes/web/users.phpindex bc6cd32c67..06e71e8100 100644--- a/routes/web/users.php+++ b/routes/web/users.php@@ -88,7 +88,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {])->name('clone/user');- Route::get(+ Route::post('{userId}/restore',[Users\UsersController::class,@@ -175,4 +175,4 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {Route::resource('users', Users\UsersController::class, ['middleware' => ['auth'],'parameters' => ['user' => 'user_id'],-]);+]);\ No newline at end of file