Przeglądaj źródła

update forgot password header

Daniel Bohry 3 tygodni temu
rodzic
commit
03fe8d8c97

+ 3 - 6
src/main/resources/static/index.html

@@ -88,12 +88,9 @@
 
             <div class="change-password-section" id="editProfileSection" style="display: none;">
                 <h3>Edit Profile</h3>
-<!--                <div style="background: #e8f4f8; padding: 12px; border-radius: 6px; margin-bottom: 20px; font-size: 0.9rem; color: #2c5282;">-->
-<!--                    <strong>How it works:</strong> You can update your email address, change your password, or both. Your current password is required for security verification.-->
-<!--                </div>-->
                 <form id="editProfileForm">
                     <div class="profile-section">
-                        <h4 style="margin-bottom: 15px; color: #333; font-size: 1rem;">Email Address</h4>
+                        <h4>Email Address</h4>
                         <div class="form-group">
                             <label for="editEmail">Email</label>
                             <input type="email" id="editEmail" name="email" placeholder="Enter your email address">
@@ -101,7 +98,7 @@
                     </div>
 
                     <div class="profile-section">
-                        <h4 style="margin-bottom: 15px; color: #333; font-size: 1rem;">Change Password</h4>
+                        <h4>Change Password</h4>
                         <div class="form-group">
                             <label for="newPassword">New Password</label>
                             <input type="password" id="newPassword" name="newPassword" placeholder="Leave empty to keep current password">
@@ -113,7 +110,7 @@
                     </div>
 
                     <div class="security-section">
-                        <h4 style="margin-bottom: 15px; color: #333; font-size: 1rem;">Security Verification</h4>
+                        <h4>Security Verification</h4>
                         <div class="form-group">
                             <label for="currentPassword">Current Password</label>
                             <input type="password" id="currentPassword" name="currentPassword" required placeholder="Enter current password to verify changes">

+ 10 - 0
src/main/resources/static/js/main.js

@@ -358,6 +358,10 @@ function updateUserDisplay() {
 function showUserSection() {
     document.getElementById('authSection').style.display = 'none';
     document.getElementById('userSection').classList.add('active');
+
+    // Ensure the main header is visible in user section
+    document.querySelector('.header').style.display = 'block';
+
     updateUserDisplay();
 }
 
@@ -366,6 +370,9 @@ function showResetPasswordSection() {
     document.getElementById('userSection').classList.remove('active');
     document.getElementById('resetPasswordSection').style.display = 'block';
 
+    // Hide the main header to avoid duplicate headers
+    document.querySelector('.header').style.display = 'none';
+
     // Focus on the first input field
     document.getElementById('resetNewPassword').focus();
 }
@@ -383,6 +390,9 @@ function logout() {
     document.getElementById('userSection').classList.remove('active');
     document.getElementById('authSection').style.display = 'block';
 
+    // Show the main header when returning to auth section
+    document.querySelector('.header').style.display = 'block';
+
     document.getElementById('loginForm').reset();
     document.getElementById('registerForm').reset();