Bulletinboard/resources/views/admin/show-user.blade.php

40 lines
1.6 KiB
PHP

<x-layout>
<div class="container">
@isset($success)
<div class="alert alert-success" role="alert">{{ $success }}</div>
@endisset
@isset($user)
<div class="card rounded shadow mt-2 mr-5 ml-5">
<div class="card-body">
<h2>Rediger Bruger</h2>
<form action="" method="post">
@method("put")
@csrf
<div class="mb-3">
<p>For at ændre dine oplysninger bedes du kontakte serverrummet, da det er dem der håndterer brugerne.</p>
</div>
@admin
<div class="mb-3">
<label for="roles" class="form-label">Rolle</label>
<select id="roles" class="form-control" name="role_id">
@foreach($roles as $role)
@if($role->id == $user->role->id)
<option value="{{ $role->id }}" selected>{{ $role->name }}</option>
@else
<option value="{{ $role->id }}">{{ $role->name }}</option>
@endif
@endforeach
</select>
</div>
@endadmin
<button type="submit" class="btn btn-primary">Opdater</button>
</form>
</div>
</div>
@endisset
</div>
</x-layout>