Added "see password" button in admin - With CSS & Script (Script in file) - Edited form style and input styles
This commit is contained in:
parent
56cbe7ad41
commit
d8ff713b90
|
@ -6943,7 +6943,7 @@ main {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spaneye {
|
.fa-eye {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
color: grey;
|
color: grey;
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
@section("content")
|
@section("content")
|
||||||
<h1>Rediger Bruger:</h1>
|
<h1>Rediger Bruger:</h1>
|
||||||
<form method="post" action="{{ route("users.update", ['user' => $user]) }}">
|
<form method="post" action="{{ route("users.update", ['user' => $user]) }}" style="display: inline-table;">
|
||||||
@csrf
|
@csrf
|
||||||
@method("put")
|
@method("put")
|
||||||
<label for="name_first">Fornavn:</label>
|
<label for="name_first">Fornavn:</label>
|
||||||
|
@ -21,13 +21,15 @@
|
||||||
<label for="email">Email:</label>
|
<label for="email">Email:</label>
|
||||||
<input type="email" name="email" id="email" value="{{ $user->email }}" required>
|
<input type="email" name="email" id="email" value="{{ $user->email }}" required>
|
||||||
<label for="password1">Password: (Forblives blank, hvis password ikke skal ændres)</label>
|
<label for="password1">Password: (Forblives blank, hvis password ikke skal ændres)</label>
|
||||||
<input type="password" name="password" id="password1" value="">
|
<input type="password" name="password" id="password1" value="" placeholder="******">
|
||||||
|
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('password1', 'fa-new')"></span>
|
||||||
<label for="password2">Confirm Password: (Forblives blank, hvis password ikke skal ændres)</label>
|
<label for="password2">Confirm Password: (Forblives blank, hvis password ikke skal ændres)</label>
|
||||||
<input type="password" id="password2" value="">
|
<input type="password" id="password2" value="" placeholder="******">
|
||||||
|
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password" id="fa-confirm" onclick="show('password2', 'fa-confirm')"></span>
|
||||||
<label for="tel">Telefon nr:</label>
|
<label for="tel">Telefon nr:</label>
|
||||||
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
<input type="tel" name="phone" id="tel" value="{{ $user->phone }}" required>
|
||||||
<label for="role">Rolle: (Brug ctrl og shift til at vælge flere)</label>
|
<label for="role">Rolle: (Brug ctrl og shift til at vælge flere)</label>
|
||||||
<select name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
<select class="w-100" name="roles[]" id="roles" class="mb-2" multiple="multiple" required>
|
||||||
@if(count($user->roles) == 0)
|
@if(count($user->roles) == 0)
|
||||||
<option disabled selected> -- Vælg Rolle(r) -- </option>
|
<option disabled selected> -- Vælg Rolle(r) -- </option>
|
||||||
<option value>Ingen Rolle</option>
|
<option value>Ingen Rolle</option>
|
||||||
|
@ -51,4 +53,34 @@
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
<input type="submit" class="btn btn-dark text-white" value="Rediger">
|
||||||
</form>
|
</form>
|
||||||
|
<style>
|
||||||
|
input {
|
||||||
|
width: calc(100% - 8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fa-eye {
|
||||||
|
position: absolute;
|
||||||
|
font-size: 25px;
|
||||||
|
color: grey;
|
||||||
|
margin: 7.5px 0 0 -45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section("scripts")
|
||||||
|
<script>
|
||||||
|
function show($passID, $faID) {
|
||||||
|
var inputPass = document.getElementById($passID);
|
||||||
|
var faEye = document.getElementById($faID);
|
||||||
|
|
||||||
|
if (inputPass.type === "password") {
|
||||||
|
inputPass.type = "text";
|
||||||
|
faEye.style.color = "#000";
|
||||||
|
} else {
|
||||||
|
inputPass.type = "password";
|
||||||
|
faEye.style.color = "#808080";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
|
@ -7,23 +7,28 @@
|
||||||
@section("content")
|
@section("content")
|
||||||
<main>
|
<main>
|
||||||
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
<h1 class="text-center sde-blue mt-0">Konto</h1>
|
||||||
<form method="post" action="{{ route("users.update", ['user' => Auth::user()]) }}" style="display: block;">
|
<form method="post" action="{{ route("users.update", ['user' => Auth::user()]) }}" style="display: inline-table;">
|
||||||
@csrf
|
@csrf
|
||||||
@method("put")
|
@method("put")
|
||||||
<span>Nuværende Password:</span>
|
<span>Nuværende Password:</span>
|
||||||
<input type="password" name="oldpassword" id="old" placeholder="******" required style="width: calc(100% - 12px)">
|
<input type="password" name="oldpassword" id="old" placeholder="******">
|
||||||
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password spaneye" id="fa-old" onclick="show('old', 'fa-old')"></span>
|
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password" id="fa-old" onclick="show('old', 'fa-old')"></span>
|
||||||
<span>Nyt Password:</span>
|
<span>Nyt Password:</span>
|
||||||
<input class="w-100" type="password" name="password" id="new" placeholder="******" required style="width: calc(100% - 12px)">
|
<input class="w-100" type="password" name="password" id="new" placeholder="******" required style="width: calc(100% - 8px)">
|
||||||
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password spaneye" id="fa-new" onclick="show('new', 'fa-new')"></span>
|
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('new', 'fa-new')"></span>
|
||||||
<span>Bekræft Nyt Password:</span>
|
<span>Bekræft Nyt Password:</span>
|
||||||
<input class="w-100" type="password" name="confirmpassword" id="confirm" placeholder="******" required style="width: calc(100% - 12px)">
|
<input class="w-100" type="password" name="confirmpassword" id="confirm" placeholder="******" required style="width: calc(100% - 8px)">
|
||||||
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password spaneye" id="fa-confirm" onclick="show('confirm', 'fa-confirm')"></span>
|
<span toggle="#password-field" class="fa fa-fw fa-eye field-icon toggle-password" id="fa-confirm" onclick="show('confirm', 'fa-confirm')"></span>
|
||||||
{!! session()->get('error#notsamepass') !!}
|
{!! session()->get('error#notsamepass') !!}
|
||||||
{!! session()->get('error#oldpass') !!}
|
{!! session()->get('error#oldpass') !!}
|
||||||
<button type="submit" class="btn text-center btn-sde-blue mt-1">Rediger</button>
|
<button type="submit" class="btn text-center btn-sde-blue mt-1">Rediger</button>
|
||||||
</form>
|
</form>
|
||||||
</main>
|
</main>
|
||||||
|
<style>
|
||||||
|
input {
|
||||||
|
width: calc(100% - 8px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
@section("scripts")
|
@section("scripts")
|
||||||
|
|
Loading…
Reference in New Issue