From 353b76429cca3a41c08971445155cfdab7bb5566 Mon Sep 17 00:00:00 2001 From: sayliraut Date: Fri, 14 Jun 2024 11:49:28 +0530 Subject: [PATCH] change --- public/assets/js/admin/auth/login.js | 9 +- .../Admin/pages/auth/password_reset.blade.php | 400 +++++++++--------- 2 files changed, 210 insertions(+), 199 deletions(-) diff --git a/public/assets/js/admin/auth/login.js b/public/assets/js/admin/auth/login.js index c54903c..6602b7c 100644 --- a/public/assets/js/admin/auth/login.js +++ b/public/assets/js/admin/auth/login.js @@ -204,12 +204,15 @@ $(document).on("click", "#password_reset", function (e) { processData: false, contentType: false, success: function (response) { - if (response.status == 200) { + if (response.status_code == 200) { $("#password_reset").prop("disabled", false); $("#password_reset").text("Login"); - window.location.href = base_url + "/"; + toastr.success(response.message); + setTimeout(function () { + window.location.href = base_url + "/"; + }, 1000); } - if (response.status == 401) { + if (response.status_code == 401) { toastr.error(response.message); form.reset(); $("#password_reset").prop("disabled", false); diff --git a/resources/views/Admin/pages/auth/password_reset.blade.php b/resources/views/Admin/pages/auth/password_reset.blade.php index 35a153f..b03e00b 100644 --- a/resources/views/Admin/pages/auth/password_reset.blade.php +++ b/resources/views/Admin/pages/auth/password_reset.blade.php @@ -1,234 +1,242 @@ @extends('Admin.layouts.app_login') @section('title', 'Cheers To Season - Password Reset') @section('content') - -
-
-
- + /* Style for the eye icon when it's not showing the password */ + .fa-eye-slash { + color: #777; + /* Adjust color as needed */ + } + + /* Transition effect for smooth icon change */ + .fa-eye, + .fa-eye-slash { + transition: color 0.3s ease; + } + +
+
+
+ +
-
-
-
@endsection @section('scripts') - - - + + + - + document.getElementById('toggleConfirmPassword').addEventListener('click', function() { + var confirmPasswordField = document.getElementById('confirm_password'); + var icon = document.getElementById('toggleConfirmPassword'); + if (confirmPasswordField.type === 'password') { + confirmPasswordField.type = 'text'; + icon.classList.remove('fa-eye-slash'); + icon.classList.add('fa-eye'); + } else { + confirmPasswordField.type = 'password'; + icon.classList.remove('fa-eye'); + icon.classList.add('fa-eye-slash'); + } + }); + - + // $(document).on("click", "#password_reset", function(e) { + // e.preventDefault(); + // $('#password_reset_form').submit(); + // }); + // }); + -@endsection \ No newline at end of file +@endsection