Modify genericActionsFormatter restore link to be a button instead since it's in a form.
Changed user restore route to POST
This commit is contained in:
parent
02459aad26
commit
123963c14c
2 changed files with 4 additions and 4 deletions
|
@ -282,7 +282,7 @@
|
||||||
if ((row.available_actions) && (row.available_actions.restore === true)) {
|
if ((row.available_actions) && (row.available_actions.restore === true)) {
|
||||||
actions += '<form style="display: inline;" method="POST" action="{{ url('/') }}/' + dest + '/' + row.id + '/restore"> ';
|
actions += '<form style="display: inline;" method="POST" action="{{ url('/') }}/' + dest + '/' + row.id + '/restore"> ';
|
||||||
actions += '@csrf';
|
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> ';
|
actions += '<i class="fa fa-retweet" aria-hidden="true"></i><span class="sr-only">{{ trans('general.restore') }}</span></button></form> ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ Route::group(['prefix' => 'users', 'middleware' => ['auth']], function () {
|
||||||
]
|
]
|
||||||
)->name('clone/user');
|
)->name('clone/user');
|
||||||
|
|
||||||
Route::get(
|
Route::post(
|
||||||
'{userId}/restore',
|
'{userId}/restore',
|
||||||
[
|
[
|
||||||
Users\UsersController::class,
|
Users\UsersController::class,
|
||||||
|
|
Loading…
Add table
Reference in a new issue