MIF_E31222313/resources/views/auth/reset-password.blade.php

90 lines
4.0 KiB
PHP

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css">
<link rel="stylesheet" href="{{ asset('auth/css/authstyle.css') }}">
<title>Reset Password</title>
</head>
<body>
<div class="container" id="container">
<!-- Reset Password Form -->
<div class="form-container sign-in">
<form method="POST" action="{{ route('password.store') }}">
@csrf
<!-- Password Reset Token -->
<input type="hidden" name="token" value="{{ $request->route('token') }}">
<h1>Atur Ulang Kata Sandi</h1>
<span>Buat kata sandi baru yang aman untuk akun Anda</span>
<!-- Email Address -->
<input type="email" id="email" name="email" placeholder="Email" value="{{ old('email', $request->email) }}" required autofocus autocomplete="username">
<x-input-error :messages="$errors->get('email')" class="mt-2" />
<!-- Password -->
<div class="password-container">
<input type="password" id="password" name="password" placeholder="Kata Sandi Baru" required autocomplete="new-password">
<i id="toggle-password" class="fas fa-eye"></i>
</div>
<x-input-error :messages="$errors->get('password')" class="mt-2" />
<!-- Confirm Password -->
<div class="confirm-password-container">
<input type="password" id="password_confirmation" name="password_confirmation" placeholder="Konfirmasi Kata Sandi" required autocomplete="new-password">
<i id="toggle-confirm-password" class="fas fa-eye"></i>
</div>
<x-input-error :messages="$errors->get('password_confirmation')" class="mt-2" />
<button type="submit">Reset Password</button>
</form>
</div>
<!-- Toggle Panel -->
<div class="toggle-container">
<div class="toggle">
<div class="toggle-panel toggle-right">
<img src="{{ asset('user/images/hero-banner.png') }}" alt="Hero Banner" class="toggle-image">
</div>
</div>
</div>
</div>
<script>
// Password visibility toggle functionality
document.addEventListener('DOMContentLoaded', function() {
// For new password field
const togglePassword = document.getElementById('toggle-password');
const password = document.getElementById('password');
togglePassword.addEventListener('click', function() {
// Toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// Toggle the eye icon
this.classList.toggle('fa-eye');
this.classList.toggle('fa-eye-slash');
});
// For confirm password field
const toggleConfirmPassword = document.getElementById('toggle-confirm-password');
const confirmPassword = document.getElementById('password_confirmation');
toggleConfirmPassword.addEventListener('click', function() {
// Toggle the type attribute
const type = confirmPassword.getAttribute('type') === 'password' ? 'text' : 'password';
confirmPassword.setAttribute('type', type);
// Toggle the eye icon
this.classList.toggle('fa-eye');
this.classList.toggle('fa-eye-slash');
});
});
</script>
</body>
</html>