Frontend support for role selection in user create, read and update.
This commit is contained in:
parent
a4ff9a3590
commit
c803d12299
|
@ -57,7 +57,8 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -57,7 +57,8 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -37,7 +37,7 @@ form {
|
|||
display: inline-flex;
|
||||
}
|
||||
|
||||
input{
|
||||
input, select{
|
||||
border: grey solid 2px;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
|
|
|
@ -25,6 +25,12 @@
|
|||
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" placeholder="12345678" pattern="[0-9]{2}[0-9]{2}[0-9]{2}[0-9]{2}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -26,6 +26,12 @@
|
|||
<input type="password" id="password2" value="" required>
|
||||
<label for="tel">Telefon nr:</label>
|
||||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||
<label for="role">Rolle:</label>
|
||||
<select name="role" id="role" class="mb-2" required>
|
||||
<option value="admin">Admin</option>
|
||||
<option value="staff">Personale</option>
|
||||
<option value="resident">Beboer</option>
|
||||
</select>
|
||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||
</form>
|
||||
@endsection
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<th>Efternavn</th>
|
||||
<th>Email</th>
|
||||
<th>Tlf nr</th>
|
||||
<th>Rolle</th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/pencil.svg') }}" alt="Update"></th>
|
||||
<th style="width: 1em;"><img class="w-100" src="{{ asset('/images/icons/trashcan.svg') }}" alt="Delete"></th>
|
||||
</tr>
|
||||
|
@ -25,6 +26,7 @@
|
|||
<td>{{ $user->name_last }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>{{ $user->phone }}</td>
|
||||
<td>{{ $user->roles }}</td>
|
||||
<td><a href="{{ route("users.edit", [ "user" => $user->id ]) }}"><img class="w-100" src="{{ asset('/images/icons/pencil-dark.svg') }}" alt="Update"></a></td>
|
||||
<td><a href="{{ route("users.destroy", [ "user" => $user ]) }}"><img class="w-100" src="{{ asset('/images/icons/trashcan-dark.svg') }}" alt="Delete"></a></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue