{% load static %} <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400&display=swap" rel="stylesheet"> <link rel="stylesheet" href="{% static 'assets/fonts/icomoon/style.css' %}"> <link rel="stylesheet" href="{% static 'assets/css/owl.carousel.min.css' %}"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="{% static 'assets/css/bootstrap.min.css' %}"> <!-- Style --> <link rel="stylesheet" href="{% static 'assets/css/style.css' %}"> <title>Hiring App : Sign In</title> <style> .nav-text{ padding: 20px 10px 0 10px; font-weight: bold; text-align: center; font-size: 1.5rem; color: rgb(77,66,255); } @media screen and (max-width: 450px) { .nav-text{ font-size: 1.2rem; } } </style> </head> <body> <div id="notification-bar" class="hidden"></div> <nav> <h1 class="nav-text text-center">Apply for the post of Vice Chancellor</h1> </nav> <div class="content"> <div class="container"> <div class="row"> <div class="col-md-6"> <img src="{% static 'assets/images/undraw_file_sync_ot38.svg' %}" alt="Image" class="img-fluid"> </div> <div class="col-md-6 contents"> <div class="row justify-content-center"> <div class="col-md-8"> <div class="mb-4"> <h3>Sign In</h3> <p class="mb-3">NIT Srinagar: Lead me from Darkness to Light </p> <h6 class="card-category"> {% if msg %} <span class="text-danger">{{ msg | safe }}</span> {% endif %} </h6> </div> {% if success %} <div class="card-footer text-center"> <a href="{% url 'login' %}" class="btn btn-block btn-primary">Login</a> </div> {% else %} <form method="post"> {% csrf_token %} <label for="new_password">New Password:</label> <input type="text" name="new_password" id="new_password" class="form-control" required> <label for="confirm_password">Confirm Password:</label> <input type="password" name="confirm_password" id="confirm_password" class="form-control" required> <button type="submit" class="btn btn-block btn-primary mt-2 mb-4" onclick="checkPassword()">Set New Password</button> </form> {% endif %} </div> </div> </div> </div> </div> </div> <script> // onclick function function checkPassword() { // Get the entered password const enteredPassword = document.getElementById('new_password').value; // Replace this with the actual password you want to check against const correctPassword = document.getElementById('confirm_password').value; // Compare the entered password with the correct password if (enteredPassword === correctPassword) { alert('Password changed successfully'); } else { alert('Password does not match'); } } document.addEventListener("DOMContentLoaded", function () { const notificationBar = document.getElementById("notification-bar"); function showNotification(status, message) { notificationBar.textContent = message; notificationBar.classList.add(status); notificationBar.classList.remove("hidden"); setTimeout(function () { hideNotification(); }, 3000); } function hideNotification() { notificationBar.textContent = ""; notificationBar.classList.remove("success", "error"); notificationBar.classList.add("hidden"); } const successMessage = "{{ success_message }}"; const errorMessage = "{{ error_message }}"; if (successMessage.trim() !== "") { showNotification("success", successMessage.trim()); } if (errorMessage.trim() !== "") { showNotification("error", errorMessage.trim()); } }); </script> <script src="{% static 'assets/js/jquery-3.3.1.min.js' %}"></script> <script src="{% static 'assets/js/popper.min.js' %}"></script> <script src="{% static 'assets/js/bootstrap.min.js' %}"></script> <script src="{% static 'assets/js/main.js' %}"></script> </body> </html>