mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-26 10:13:38 +08:00
Fixed issue with user delete ownership not migrating
Caused by input not being part of the submitted form. Updated test to ensure the input is within a form. For #4124
This commit is contained in:
parent
9b66e93b15
commit
0e43618dda
|
@ -5,6 +5,9 @@
|
|||
|
||||
@include('settings.parts.navbar', ['selected' => 'users'])
|
||||
|
||||
<form action="{{ url("/settings/users/{$user->id}") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="card content-wrap auto-height">
|
||||
<h1 class="list-heading">{{ trans('settings.users_delete') }}</h1>
|
||||
|
||||
|
@ -28,17 +31,14 @@
|
|||
|
||||
<div class="grid half">
|
||||
<p class="text-neg"><strong>{{ trans('settings.users_delete_confirm') }}</strong></p>
|
||||
<div>
|
||||
<form action="{{ url("/settings/users/{$user->id}") }}" method="POST" class="text-right">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="text-right">
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<a href="{{ url("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
<button type="submit" class="button">{{ trans('common.confirm') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@stop
|
||||
|
|
|
@ -145,6 +145,7 @@ class UserManagementTest extends TestCase
|
|||
|
||||
$resp = $this->asEditor()->get("settings/users/{$editor->id}/delete");
|
||||
$resp->assertSee('Migrate Ownership');
|
||||
$this->withHtml($resp)->assertElementExists('form input[name="new_owner_id"]');
|
||||
$resp->assertSee('new_owner_id');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user