Fixed - Password & Confirm Password in create user now need to be the same.
Added new "see password" function on all password sites. Fixed bugs
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
@section("content")
|
||||
<h1>Opret Bruger:</h1>
|
||||
{!! session()->get('error#notsamepass') !!}
|
||||
<form method="post" action="{{ route("users.store") }}">
|
||||
@csrf
|
||||
<label for="name_first">Fornavn:</label>
|
||||
@@ -20,9 +21,15 @@
|
||||
<label for="email">Email:</label>
|
||||
<input type="email" name="email" id="email" placeholder="x@y.z" required>
|
||||
<label for="password1">Password:</label>
|
||||
<input type="password" name="password" placeholder="Password" id="password1" required>
|
||||
<label for="password2">Bekræft Password:</label>
|
||||
<input type="password" id="password2" placeholder="Bekræft Password" required>
|
||||
<div class="input-group text-left">
|
||||
<input type="password" class="form-control" name="password" id="password1" placeholder="******" required>
|
||||
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('password1', 'fa-new')"></span>
|
||||
</div>
|
||||
<label for="password2">Confirm Password:</label>
|
||||
<div class="input-group text-left">
|
||||
<input type="password" class="form-control" name="password2" id="password2" placeholder="******" required>
|
||||
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-confirm" onclick="show('password2', 'fa-confirm')"></span>
|
||||
</div>
|
||||
<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="roles">Rolle:</label>
|
||||
@@ -36,3 +43,20 @@
|
||||
<input type="submit" class="btn btn-dark text-white" value="Opret">
|
||||
</form>
|
||||
@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
|
||||
|
||||
Reference in New Issue
Block a user