mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 05:46:09 +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'])
|
@include('settings.parts.navbar', ['selected' => 'users'])
|
||||||
|
|
||||||
|
<form action="{{ url("/settings/users/{$user->id}") }}" method="POST">
|
||||||
|
{!! csrf_field() !!}
|
||||||
|
|
||||||
<div class="card content-wrap auto-height">
|
<div class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('settings.users_delete') }}</h1>
|
<h1 class="list-heading">{{ trans('settings.users_delete') }}</h1>
|
||||||
|
|
||||||
|
@ -28,17 +31,14 @@
|
||||||
|
|
||||||
<div class="grid half">
|
<div class="grid half">
|
||||||
<p class="text-neg"><strong>{{ trans('settings.users_delete_confirm') }}</strong></p>
|
<p class="text-neg"><strong>{{ trans('settings.users_delete_confirm') }}</strong></p>
|
||||||
<div>
|
<div class="text-right">
|
||||||
<form action="{{ url("/settings/users/{$user->id}") }}" method="POST" class="text-right">
|
|
||||||
{!! csrf_field() !!}
|
|
||||||
|
|
||||||
<input type="hidden" name="_method" value="DELETE">
|
<input type="hidden" name="_method" value="DELETE">
|
||||||
<a href="{{ url("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
<a href="{{ url("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||||
<button type="submit" class="button">{{ trans('common.confirm') }}</button>
|
<button type="submit" class="button">{{ trans('common.confirm') }}</button>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@stop
|
@stop
|
||||||
|
|
|
@ -145,6 +145,7 @@ class UserManagementTest extends TestCase
|
||||||
|
|
||||||
$resp = $this->asEditor()->get("settings/users/{$editor->id}/delete");
|
$resp = $this->asEditor()->get("settings/users/{$editor->id}/delete");
|
||||||
$resp->assertSee('Migrate Ownership');
|
$resp->assertSee('Migrate Ownership');
|
||||||
|
$this->withHtml($resp)->assertElementExists('form input[name="new_owner_id"]');
|
||||||
$resp->assertSee('new_owner_id');
|
$resp->assertSee('new_owner_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user