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:
Anders
2020-08-03 10:36:57 +02:00
parent 93198e5a54
commit b4263d8891
5 changed files with 69 additions and 52 deletions
@@ -7,7 +7,7 @@
@section("content")
<main>
<h1 class="text-center sde-blue mt-0">Konto</h1>
<form method="post" action="{{ route("users.accountupdate", ['user' => Auth::user()]) }}" style="display: inline-table;">
<form method="post" action="{{ route("users.accountupdate", ['user' => Auth::user()]) }}">
@csrf
@method("put")
<span>Nuværende Password:</span>
@@ -20,7 +20,7 @@
<input type="password" class="form-control" name="password" id="new" placeholder="******" required>
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-new" onclick="show('new', 'fa-new')"></span>
</div>
<span>Bekræft Nyt Password:</span>
<span>Confirm Password:</span>
<div class="input-group text-left">
<input type="password" class="form-control" name="confirmpassword" id="confirm" placeholder="******" required>
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-confirm" onclick="show('confirm', 'fa-confirm')"></span>
@@ -12,7 +12,10 @@
<form action="{{ route("users.login") }}" method="post">
@csrf
<input class="appinput" type="email" name="email" placeholder="Email" required>
<input class="appinput" type="password" name="password" placeholder="Password" required>
<div class="input-group text-left">
<input type="password" class="appinput form-control" name="password" id="password" placeholder="Password" required>
<span class="fa fa-fw fa-eye field-icon toggle-password" id="fa-password" onclick="show('password', 'fa-password')" style="background-color: #00788a; color: white;"></span>
</div>
<label class="toggle">
<input class="toggle__input" type="checkbox" name="rememberpassword">
<span class="toggle__label">
@@ -25,3 +28,20 @@
<a class="text-white text-center" href="{{ route('users.show-forgot') }}">Forgot password?</a>
</main>
@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 = "#999";
} else {
inputPass.type = "password";
faEye.style.color = "#fff";
}
}
</script>
@endsection