v1.4.10 - Event, Guide & Menuplan pictures can now be updated and changed correctly (Menuplan is determined when creating, can't change picture later)
There is no longer a second news, when updating an event or such Added Select2 when chosing roles for users Removed guide button
This commit is contained in:
@@ -10,6 +10,23 @@
|
||||
@endsection
|
||||
|
||||
@section("content")
|
||||
<style>
|
||||
.select2-container--default .select2-results > .select2-results__options {
|
||||
max-height: 120px !important;
|
||||
}
|
||||
|
||||
.select2-results__option, .select2-search__field {
|
||||
color: black;
|
||||
}
|
||||
</style>
|
||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>
|
||||
<script>
|
||||
// In your Javascript (external .js resource or <script> tag)
|
||||
$(document).ready(function() {
|
||||
$('.js-example-basic-multiple').select2();
|
||||
});
|
||||
</script>
|
||||
<h1>Rediger Bruger:</h1>
|
||||
<form method="post" action="{{ route("users.update", ['user' => $user]) }}" onsubmit="return checkInputs()" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@@ -36,16 +53,14 @@
|
||||
<label hidden id="errorphone">Der findes allerede en bruger med dette telefon nr!</label>
|
||||
<input type="tel" name="phone" id="phone" value="{{ $user->phone }}" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<label for="role">Rolle: (Brug ctrl og shift til at vælge flere)</label>
|
||||
<select class="w-100" name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||
|
||||
<select id="roles" class="js-example-basic-multiple mb-2" name="roles[]" multiple="multiple" required>
|
||||
<optgroup label="Roller">
|
||||
@if(count($user->roles) == 0)
|
||||
<option disabled selected> -- Vælg Rolle(r) -- </option>
|
||||
<option value>Ingen Rolle</option>
|
||||
@foreach($roles as $role)
|
||||
<option value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
@else
|
||||
<option disabled> -- Vælg Rolle(r) -- </option>
|
||||
<option value>Ingen Rolle</option>
|
||||
@foreach($roles as $role)
|
||||
{{ $selected = "" }}
|
||||
@foreach($user->roles as $userRole)
|
||||
@@ -56,6 +71,7 @@
|
||||
<option {{ $selected }} value="{{ $role->name }}">{{ $role->name }}</option>
|
||||
@endforeach
|
||||
@endif
|
||||
</optgroup>
|
||||
</select>
|
||||
<label for="fileuploade">Skift brugerens profile billede:</label>
|
||||
<input id="fileuploade" type="file" name="resource" accept="image/*">
|
||||
|
||||
Reference in New Issue
Block a user