Create Account

Register for Engineering Works Monitor

Already have an account? Sign in

/* static/css/auth.css */ .form-input-error { border-color: #ef4444 !important; } .password-strength-weak { color: #ef4444; } .password-strength-medium { color: #f59e0b; } .password-strength-strong { color: #10b981; } .loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); display: flex; justify-content: center; align-items: center; z-index: 1000; } .loading-spinner { border: 4px solid #f3f3f3; border-top: 4px solid #3498db; border-radius: 50%; width: 40px; height: 40px; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* static/js/auth.js */ document.addEventListener('DOMContentLoaded', function() { // Password visibility toggle document.querySelectorAll('.toggle-password').forEach(button => { button.addEventListener('click', function() { const input = this.parentElement.querySelector('input'); if (input.type === 'password') { input.type = 'text'; this.innerHTML = ` `; } else { input.type = 'password'; this.innerHTML = ` `; } }); }); // Sign up form validation const signupForm = document.getElementById('signupForm'); if (signupForm) { const passwordInput = document.getElementById('password'); const confirmPasswordInput = document.getElementById('confirm_password'); const passwordStrengthDiv = document.getElementById('password-strength'); function checkPasswordStrength(password) { let strength = 0; if (password.length >= 8) strength++; if (password.match(/[a-z]/)) strength++; if (password.match(/[A-Z]/)) strength++; if (password.match(/[0-9]/)) strength++; if (password.match(/[^a-zA-Z0-9]/)) strength++; switch (strength) { case 0: case 1: return ['Weak', 'password-