56 lines
2.3 KiB
PHP
Executable File
56 lines
2.3 KiB
PHP
Executable File
<section>
|
|
<header>
|
|
<h2 class="h5 fw-bold text-gray-800 mb-1">Atualizar Senha</h2>
|
|
<p class="text-muted small">Garanta que sua conta esteja usando uma senha longa e aleatória para manter-se segura.</p>
|
|
</header>
|
|
|
|
<form method="post" action="{{ route('password.update') }}" class="mt-4">
|
|
@csrf
|
|
@method('put')
|
|
|
|
<div class="mb-3">
|
|
<label for="update_password_password" class="form-label">Nova Senha</label>
|
|
<div class="input-group">
|
|
<input type="password" class="form-control" id="update_password_password" name="password" autocomplete="new-password">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="togglePasswordVisibility('update_password_password', this)">
|
|
<i class="bi bi-eye"></i>
|
|
</button>
|
|
</div>
|
|
@error('password') <div class="text-danger small">{{ $message }}</div> @enderror
|
|
</div>
|
|
|
|
<div class="mb-3">
|
|
<label for="update_password_password_confirmation" class="form-label">Confirmar Senha</label>
|
|
<div class="input-group">
|
|
<input type="password" class="form-control" id="update_password_password_confirmation" name="password_confirmation" autocomplete="new-password">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="togglePasswordVisibility('update_password_password_confirmation', this)">
|
|
<i class="bi bi-eye"></i>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="d-flex align-items-center gap-3">
|
|
<button type="submit" class="btn btn-primary">Salvar</button>
|
|
|
|
@if (session('status') === 'password-updated')
|
|
<span class="small text-success">Senha atualizada.</span>
|
|
@endif
|
|
</div>
|
|
</form>
|
|
</section>
|
|
|
|
<script>
|
|
function togglePasswordVisibility(inputId, button) {
|
|
const input = document.getElementById(inputId);
|
|
const icon = button.querySelector('i');
|
|
if (input.type === 'password') {
|
|
input.type = 'text';
|
|
icon.classList.remove('bi-eye');
|
|
icon.classList.add('bi-eye-slash');
|
|
} else {
|
|
input.type = 'password';
|
|
icon.classList.remove('bi-eye-slash');
|
|
icon.classList.add('bi-eye');
|
|
}
|
|
}
|
|
</script> |