291 lines
9.0 KiB
PHP
291 lines
9.0 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Reset Password - SiPakarTebu</title>
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background-color: #f0f4f0;
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.card {
|
|
background: #ffffff;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
width: 100%;
|
|
max-width: 390px;
|
|
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
|
|
}
|
|
|
|
.card-header {
|
|
background-color: #2d6a4f;
|
|
padding: 32px 24px;
|
|
text-align: center;
|
|
color: white;
|
|
}
|
|
|
|
.card-header h1 {
|
|
font-size: 26px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.card-header p {
|
|
font-size: 13px;
|
|
margin-top: 4px;
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.card-body {
|
|
padding: 28px 28px 32px;
|
|
}
|
|
|
|
.card-body h2 {
|
|
font-size: 20px;
|
|
font-weight: 700;
|
|
color: #1a1a1a;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.card-body .subtitle {
|
|
font-size: 13px;
|
|
color: #666;
|
|
margin-bottom: 22px;
|
|
}
|
|
|
|
.alert-error {
|
|
background-color: #fde8e8;
|
|
border: 1px solid #f5c6c6;
|
|
border-radius: 8px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 16px;
|
|
color: #c0392b;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.alert-success {
|
|
background-color: #e8f5e9;
|
|
border: 1px solid #c8e6c9;
|
|
border-radius: 8px;
|
|
padding: 10px 14px;
|
|
margin-bottom: 16px;
|
|
color: #2d6a4f;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.form-group {
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.form-group label {
|
|
display: block;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.8px;
|
|
color: #444;
|
|
margin-bottom: 8px;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.form-group input {
|
|
width: 100%;
|
|
padding: 14px 16px;
|
|
border: 1.5px solid #ddd;
|
|
border-radius: 8px;
|
|
font-size: 15px;
|
|
color: #333;
|
|
outline: none;
|
|
transition: border-color 0.2s;
|
|
background-color: #fff;
|
|
}
|
|
|
|
.form-group input:focus {
|
|
border-color: #2d6a4f;
|
|
box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
|
|
}
|
|
|
|
.form-group input.is-invalid {
|
|
border-color: #e74c3c;
|
|
}
|
|
|
|
.invalid-feedback {
|
|
color: #e74c3c;
|
|
font-size: 12px;
|
|
margin-top: 5px;
|
|
}
|
|
|
|
.password-wrapper {
|
|
position: relative;
|
|
}
|
|
|
|
.password-wrapper input {
|
|
padding-right: 44px;
|
|
}
|
|
|
|
.toggle-password {
|
|
position: absolute;
|
|
right: 14px;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
cursor: pointer;
|
|
color: #888;
|
|
background: none;
|
|
border: none;
|
|
font-size: 18px;
|
|
line-height: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.btn-primary {
|
|
width: 100%;
|
|
padding: 15px;
|
|
background-color: #2d6a4f;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: background-color 0.2s;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background-color: #245a42;
|
|
}
|
|
|
|
.btn-primary:active {
|
|
background-color: #1e4d38;
|
|
}
|
|
|
|
.back-link {
|
|
display: block;
|
|
text-align: center;
|
|
margin-top: 18px;
|
|
color: #555;
|
|
font-size: 13px;
|
|
text-decoration: none;
|
|
transition: color 0.2s;
|
|
}
|
|
|
|
.back-link:hover {
|
|
color: #2d6a4f;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="card">
|
|
{{-- Header --}}
|
|
<div class="card-header">
|
|
<h1>SiPakarTebu</h1>
|
|
<p>Sistem Diagnosis Penyakit Tanaman Tebu</p>
|
|
</div>
|
|
|
|
{{-- Body --}}
|
|
<div class="card-body">
|
|
<h2>Reset Password</h2>
|
|
<p class="subtitle">Masukkan password baru kamu</p>
|
|
|
|
{{-- Error messages --}}
|
|
@if ($errors->any())
|
|
<div class="alert-error">
|
|
@foreach ($errors->all() as $error)
|
|
<div>{{ $error }}</div>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
|
|
{{-- Success message --}}
|
|
@if (session('status'))
|
|
<div class="alert-success">
|
|
{{ session('status') }}
|
|
</div>
|
|
@endif
|
|
|
|
<form method="POST" action="{{ route('password.reset') }}">
|
|
@csrf
|
|
|
|
{{-- Hidden fields --}}
|
|
<input type="hidden" name="token" value="{{ $token ?? request()->route('token') }}">
|
|
<input type="hidden" name="email" value="{{ $email ?? request('email') }}">
|
|
|
|
{{-- Password Baru --}}
|
|
<div class="form-group">
|
|
<label for="password">PASSWORD BARU</label>
|
|
<div class="password-wrapper">
|
|
<input
|
|
type="password"
|
|
id="password"
|
|
name="password"
|
|
placeholder="Masukkan password baru"
|
|
required
|
|
autocomplete="new-password"
|
|
class="{{ $errors->has('password') ? 'is-invalid' : '' }}"
|
|
>
|
|
<button type="button" class="toggle-password" onclick="togglePassword('password', this)" title="Tampilkan password">
|
|
<svg id="icon-password" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
</button>
|
|
</div>
|
|
@error('password')
|
|
<div class="invalid-feedback">{{ $message }}</div>
|
|
@enderror
|
|
</div>
|
|
|
|
{{-- Konfirmasi Password --}}
|
|
<div class="form-group">
|
|
<label for="password_confirmation">KONFIRMASI PASSWORD</label>
|
|
<div class="password-wrapper">
|
|
<input
|
|
type="password"
|
|
id="password_confirmation"
|
|
name="password_confirmation"
|
|
placeholder="Ulangi password baru"
|
|
required
|
|
autocomplete="new-password"
|
|
>
|
|
<button type="button" class="toggle-password" onclick="togglePassword('password_confirmation', this)" title="Tampilkan password">
|
|
<svg id="icon-password_confirmation" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn-primary">Simpan Password</button>
|
|
</form>
|
|
|
|
<a href="{{ route('login') }}" class="back-link">← Kembali ke Login</a>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
const eyeIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>`;
|
|
const eyeSlashIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/></svg>`;
|
|
|
|
function togglePassword(fieldId, btn) {
|
|
const input = document.getElementById(fieldId);
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
btn.innerHTML = eyeSlashIcon;
|
|
} else {
|
|
input.type = 'password';
|
|
btn.innerHTML = eyeIcon;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |