2016-02-27 20:24:42 +01:00
|
|
|
@extends('base')
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
|
|
|
@include('settings/navbar', ['selected' => 'roles'])
|
|
|
|
|
|
|
|
<div class="container small" ng-non-bindable>
|
|
|
|
<h1>Delete Role</h1>
|
2016-08-14 13:29:35 +02:00
|
|
|
<p>This will delete the role with the name '{{ $role->display_name }}'.</p>
|
2016-02-27 20:24:42 +01:00
|
|
|
|
2016-08-14 13:29:35 +02:00
|
|
|
<form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
|
2016-02-27 20:24:42 +01:00
|
|
|
{!! csrf_field() !!}
|
|
|
|
<input type="hidden" name="_method" value="DELETE">
|
|
|
|
|
|
|
|
@if($role->users->count() > 0)
|
|
|
|
<div class="form-group">
|
|
|
|
<p>This role has {{$role->users->count()}} users assigned to it. If you would like to migrate the users from this role select a new role below.</p>
|
|
|
|
@include('form/role-select', ['options' => $roles, 'name' => 'migration_role_id'])
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
|
|
|
|
<p class="text-neg">Are you sure you want to delete this role?</p>
|
2016-08-14 13:29:35 +02:00
|
|
|
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button">Cancel</a>
|
2016-02-27 20:24:42 +01:00
|
|
|
<button type="submit" class="button neg">Confirm</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@stop
|