mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 21:11:08 -05:00
commits
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10
accounts/management/commands/fix_migration_history.py
Normal file
10
accounts/management/commands/fix_migration_history.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from django.core.management.base import BaseCommand
|
||||||
|
from django.db import connection
|
||||||
|
|
||||||
|
class Command(BaseCommand):
|
||||||
|
help = 'Fix migration history by removing rides.0001_initial'
|
||||||
|
|
||||||
|
def handle(self, *args, **kwargs):
|
||||||
|
with connection.cursor() as cursor:
|
||||||
|
cursor.execute("DELETE FROM django_migrations WHERE app='rides' AND name='0001_initial';")
|
||||||
|
self.stdout.write(self.style.SUCCESS('Successfully removed rides.0001_initial from migration history'))
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2182,6 +2182,10 @@ select {
|
|||||||
height: 2rem;
|
height: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-6 {
|
||||||
|
height: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.min-h-\[calc\(100vh-16rem\)\] {
|
.min-h-\[calc\(100vh-16rem\)\] {
|
||||||
min-height: calc(100vh - 16rem);
|
min-height: calc(100vh - 16rem);
|
||||||
}
|
}
|
||||||
@@ -2214,6 +2218,10 @@ select {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-6 {
|
||||||
|
width: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.max-w-3xl {
|
.max-w-3xl {
|
||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48">
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 245 240">
|
||||||
<path fill="#7289DA" d="M40.634 11.546c-3.286-2.466-6.824-3.894-10.532-4.546l-.524 1.05c2.898.698 5.574 1.746 8.074 3.142-3.426-1.89-7.144-3.19-11.074-3.89-2.66-.56-5.374-.84-8.074-.84-2.7 0-5.414.28-8.074.84-3.93.7-7.648 2-11.074 3.89 2.5-1.396 5.176-2.444 8.074-3.142l-.524-1.05c-3.708.652-7.246 2.08-10.532 4.546C2.146 17.44 0 24.894 0 32.894c0 .14.006.28.014.42 3.43 4.674 8.25 7.956 13.986 9.384 1.092-.882 2.078-1.87 2.946-2.94-1.642-.614-3.214-1.45-4.678-2.486 1.048.652 2.144 1.218 3.274 1.688 1.994.826 4.118 1.472 6.458 1.87 2.338.398 4.758.598 7.194.598s4.856-.2 7.194-.598c2.34-.398 4.464-1.044 6.458-1.87 1.13-.47 2.226-1.036 3.274-1.688-1.464 1.036-3.036 1.872-4.678 2.486.868 1.07 1.854 2.058 2.946 2.94 5.736-1.428 10.556-4.71 13.986-9.384.008-.14.014-.28.014-.42 0-8-2.146-15.454-6.374-21.348zM16.344 34.394c-2.7 0-4.894-2.52-4.894-5.6s2.194-5.6 4.894-5.6 4.894 2.52 4.894 5.6c0 3.08-2.194 5.6-4.894 5.6zm15.606 0c-2.7 0-4.894-2.52-4.894-5.6s2.194-5.6 4.894-5.6 4.894 2.52 4.894 5.6c0 3.08-2.194 5.6-4.894 5.6z"/>
|
<path fill="#7289DA" d="M104.4 0c-1.2 0-2.3.5-3.1 1.4-19.7 21.6-31.4 48.5-31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 19.7 21.6 31.4 48.5 31.4 77.1 0 1.2.5 2.3 1.4 3.1 8.8 9.6 18.3 18.6 28.6 26.9 1.8 1.6 3.7 2.7 5.7 3.3 1.1.3 2.2.6 3.3.8 20.8 3.8 42.5 5.7 64.9 5.7 22.4 0 44.1-1.9 64.9-5.7 1.1-.3 2.2-.6 3.3-.8 2-0.6 3.9-1.7 5.7-3.3 10.3-8.3 19.8-17.3 28.6-26.9.9-.8 1.4-1.7 1.4-3.1 0-29-9.7-55.5-31.4-77.1-.9-.8-1.8-1.4-3.1-1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4-29 0-55.5 9.7-77.1 31.4-.8.9-1.4 1.8-1.4 3.1 0 29 9.7 55.5 31.4 77.1-.9.8-1.8 1.4-3.1 1.4zM169.7 107.1c-20.8 0-38.5 8.3-52.2 20.8-1.6 1.6-2.6 3.7-3.1 5.9-.7 3.1-1 6.3-1 9.6 0 13.5 10.9 24.4 24.4 24.4 13.5 0 24.4-10.9 24.4-24.4 0-3.3-.4-6.5-1-9.6-.5-2.2-1.5-4.3-3.1-5.9-13.7-12.5-31.4-20.8-52.2-20.8zm82.3 0c-20.8 0-38.5 8.3-52.2 20.8-1.6 1.6-2.6 3.7-3.1 5.9-.7 3.1-1 6.3-1 9.6 0 13.5 10.9 24.4 24.4 24.4 13.5 0 24.4-10.9 24.4-24.4 0-3.3-.4-6.5-1-9.6-.5-2.2-1.5-4.3-3.1-5.9-13.7-12.5-31.4-20.8-52.2-20.8z"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -4,6 +4,9 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
const darkMode = localStorage.getItem('darkMode') === 'true';
|
const darkMode = localStorage.getItem('darkMode') === 'true';
|
||||||
if (darkMode) {
|
if (darkMode) {
|
||||||
document.documentElement.classList.add('dark');
|
document.documentElement.classList.add('dark');
|
||||||
|
toggleIcons(true); // Ensure correct icon is shown
|
||||||
|
} else {
|
||||||
|
toggleIcons(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -77,3 +80,24 @@ document.addEventListener('click', (e) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Toggle dark mode icons
|
||||||
|
function toggleIcons(isDarkMode) {
|
||||||
|
const sunIcon = document.querySelector('.fa-sun');
|
||||||
|
const moonIcon = document.querySelector('.fa-moon');
|
||||||
|
|
||||||
|
if (isDarkMode) {
|
||||||
|
sunIcon.classList.remove('hidden');
|
||||||
|
moonIcon.classList.add('hidden');
|
||||||
|
} else {
|
||||||
|
sunIcon.classList.add('hidden');
|
||||||
|
moonIcon.classList.remove('hidden');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add event listener for theme toggle button
|
||||||
|
document.getElementById('theme-toggle').addEventListener('click', () => {
|
||||||
|
const isDarkMode = document.documentElement.classList.toggle('dark');
|
||||||
|
localStorage.setItem('darkMode', isDarkMode);
|
||||||
|
toggleIcons(isDarkMode);
|
||||||
|
});
|
||||||
|
|||||||
@@ -22,10 +22,10 @@
|
|||||||
tabindex="0"
|
tabindex="0"
|
||||||
onkeydown="if(event.key === 'Enter' || event.key === ' ') { this.click(); event.preventDefault(); }">
|
onkeydown="if(event.key === 'Enter' || event.key === ' ') { this.click(); event.preventDefault(); }">
|
||||||
{% if provider.id == 'google' %}
|
{% if provider.id == 'google' %}
|
||||||
<img src="{% static 'images/google-icon.svg' %}" alt="Google" class="w-5 h-5 mr-3">
|
<i class="fab fa-google w-5 h-5 mr-3"></i>
|
||||||
<span>Continue with Google</span>
|
<span>Continue with Google</span>
|
||||||
{% elif provider.id == 'discord' %}
|
{% elif provider.id == 'discord' %}
|
||||||
<img src="{% static 'images/discord-icon.svg' %}" alt="Discord" class="w-5 h-5 mr-3">
|
<i class="fab fa-discord w-5 h-5 mr-3"></i>
|
||||||
<span>Continue with Discord</span>
|
<span>Continue with Discord</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -12,20 +12,21 @@
|
|||||||
<h1 class="auth-title">{% trans "Create Account" %}</h1>
|
<h1 class="auth-title">{% trans "Create Account" %}</h1>
|
||||||
|
|
||||||
{% get_providers as socialaccount_providers %}
|
{% get_providers as socialaccount_providers %}
|
||||||
|
|
||||||
{% if socialaccount_providers %}
|
{% if socialaccount_providers %}
|
||||||
<div class="space-y-3">
|
<div class="space-y-3">
|
||||||
{% for provider in socialaccount_providers %}
|
{% for provider in socialaccount_providers %}
|
||||||
<a href="{% provider_login_url provider.id process='signup' %}"
|
<a
|
||||||
|
href="{% provider_login_url provider.id process='signup' %}"
|
||||||
class="btn-social {% if provider.id == 'discord' %}btn-discord{% elif provider.id == 'google' %}btn-google{% endif %}"
|
class="btn-social {% if provider.id == 'discord' %}btn-discord{% elif provider.id == 'google' %}btn-google{% endif %}"
|
||||||
role="button"
|
role="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
onkeydown="if(event.key === 'Enter' || event.key === ' ') { this.click(); event.preventDefault(); }">
|
onkeydown="if(event.key === 'Enter' || event.key === ' ') { this.click(); event.preventDefault(); }"
|
||||||
|
>
|
||||||
{% if provider.id == 'google' %}
|
{% if provider.id == 'google' %}
|
||||||
<img src="{% static 'images/google-icon.svg' %}" alt="Google" class="w-5 h-5 mr-3">
|
<i class="fab fa-google w-5 h-5 mr-3"></i>
|
||||||
<span>Continue with Google</span>
|
<span>Continue with Google</span>
|
||||||
{% elif provider.id == 'discord' %}
|
{% elif provider.id == 'discord' %}
|
||||||
<img src="{% static 'images/discord-icon.svg' %}" alt="Discord" class="w-5 h-5 mr-3">
|
<i class="fab fa-discord w-5 h-5 mr-3"></i>
|
||||||
<span>Continue with Discord</span>
|
<span>Continue with Discord</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
@@ -39,7 +40,6 @@
|
|||||||
|
|
||||||
<form class="space-y-6" method="POST" action="{% url 'account_signup' %}">
|
<form class="space-y-6" method="POST" action="{% url 'account_signup' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
{% if form.non_field_errors %}
|
{% if form.non_field_errors %}
|
||||||
<div class="alert alert-error">
|
<div class="alert alert-error">
|
||||||
<div class="text-sm">{{ form.non_field_errors }}</div>
|
<div class="text-sm">{{ form.non_field_errors }}</div>
|
||||||
@@ -50,21 +50,29 @@
|
|||||||
<label for="id_username" class="form-label">
|
<label for="id_username" class="form-label">
|
||||||
{% trans "Username" %}
|
{% trans "Username" %}
|
||||||
</label>
|
</label>
|
||||||
<input type="text" name="username" id="id_username" required
|
<input
|
||||||
|
type="text"
|
||||||
|
name="username"
|
||||||
|
id="id_username"
|
||||||
|
required
|
||||||
autocomplete="username"
|
autocomplete="username"
|
||||||
class="form-input">
|
class="form-input"
|
||||||
|
/>
|
||||||
{% if form.username.errors %}
|
{% if form.username.errors %}
|
||||||
<p class="form-error">{{ form.username.errors }}</p>
|
<p class="form-error">{{ form.username.errors }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="id_email" class="form-label">
|
<label for="id_email" class="form-label">{% trans "Email" %}</label>
|
||||||
{% trans "Email" %}
|
<input
|
||||||
</label>
|
type="email"
|
||||||
<input type="email" name="email" id="id_email" required
|
name="email"
|
||||||
|
id="id_email"
|
||||||
|
required
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
class="form-input">
|
class="form-input"
|
||||||
|
/>
|
||||||
{% if form.email.errors %}
|
{% if form.email.errors %}
|
||||||
<p class="form-error">{{ form.email.errors }}</p>
|
<p class="form-error">{{ form.email.errors }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -74,10 +82,15 @@
|
|||||||
<label for="id_password1" class="form-label">
|
<label for="id_password1" class="form-label">
|
||||||
{% trans "Password" %}
|
{% trans "Password" %}
|
||||||
</label>
|
</label>
|
||||||
<input type="password" name="password1" id="id_password1" required
|
<input
|
||||||
|
type="password"
|
||||||
|
name="password1"
|
||||||
|
id="id_password1"
|
||||||
|
required
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
oninput="validatePassword(this.value)">
|
oninput="validatePassword(this.value)"
|
||||||
|
/>
|
||||||
{% if form.password1.errors %}
|
{% if form.password1.errors %}
|
||||||
<p class="form-error">{{ form.password1.errors }}</p>
|
<p class="form-error">{{ form.password1.errors }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -107,17 +120,26 @@
|
|||||||
<label for="id_password2" class="form-label">
|
<label for="id_password2" class="form-label">
|
||||||
{% trans "Confirm Password" %}
|
{% trans "Confirm Password" %}
|
||||||
</label>
|
</label>
|
||||||
<input type="password" name="password2" id="id_password2" required
|
<input
|
||||||
|
type="password"
|
||||||
|
name="password2"
|
||||||
|
id="id_password2"
|
||||||
|
required
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
class="form-input"
|
class="form-input"
|
||||||
oninput="validatePasswordMatch()">
|
oninput="validatePasswordMatch()"
|
||||||
|
/>
|
||||||
{% if form.password2.errors %}
|
{% if form.password2.errors %}
|
||||||
<p class="form-error">{{ form.password2.errors }}</p>
|
<p class="form-error">{{ form.password2.errors }}</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if redirect_field_value %}
|
{% if redirect_field_value %}
|
||||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}">
|
<input
|
||||||
|
type="hidden"
|
||||||
|
name="{{ redirect_field_name }}"
|
||||||
|
value="{{ redirect_field_value }}"
|
||||||
|
/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@@ -131,77 +153,80 @@
|
|||||||
<div class="mt-6 text-sm text-center">
|
<div class="mt-6 text-sm text-center">
|
||||||
<p class="text-gray-600 dark:text-gray-400">
|
<p class="text-gray-600 dark:text-gray-400">
|
||||||
{% trans "Already have an account?" %}
|
{% trans "Already have an account?" %}
|
||||||
<a href="{% url 'account_login' %}"
|
<a
|
||||||
|
href="{% url 'account_login' %}"
|
||||||
class="ml-1 font-medium transition-colors text-primary hover:text-primary/80 focus:outline-none focus:underline"
|
class="ml-1 font-medium transition-colors text-primary hover:text-primary/80 focus:outline-none focus:underline"
|
||||||
onkeydown="if(event.key === 'Enter') { this.click(); }">
|
onkeydown="if(event.key === 'Enter') { this.click(); }"
|
||||||
|
>
|
||||||
{% trans "Sign in" %}
|
{% trans "Sign in" %}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function validatePassword(password) {
|
function validatePassword(password) {
|
||||||
// Length requirement
|
// Length requirement
|
||||||
const lengthReq = document.getElementById('req-length');
|
const lengthReq = document.getElementById("req-length");
|
||||||
if (password.length >= 8) {
|
if (password.length >= 8) {
|
||||||
lengthReq.classList.remove('invalid');
|
lengthReq.classList.remove("invalid");
|
||||||
lengthReq.classList.add('valid');
|
lengthReq.classList.add("valid");
|
||||||
lengthReq.querySelector('i').classList.remove('fa-circle');
|
lengthReq.querySelector("i").classList.remove("fa-circle");
|
||||||
lengthReq.querySelector('i').classList.add('fa-check');
|
lengthReq.querySelector("i").classList.add("fa-check");
|
||||||
} else {
|
} else {
|
||||||
lengthReq.classList.remove('valid');
|
lengthReq.classList.remove("valid");
|
||||||
lengthReq.classList.add('invalid');
|
lengthReq.classList.add("invalid");
|
||||||
lengthReq.querySelector('i').classList.remove('fa-check');
|
lengthReq.querySelector("i").classList.remove("fa-check");
|
||||||
lengthReq.querySelector('i').classList.add('fa-circle');
|
lengthReq.querySelector("i").classList.add("fa-circle");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Numeric requirement
|
// Numeric requirement
|
||||||
const numericReq = document.getElementById('req-numeric');
|
const numericReq = document.getElementById("req-numeric");
|
||||||
if (!/^\d+$/.test(password)) {
|
if (!/^\d+$/.test(password)) {
|
||||||
numericReq.classList.remove('invalid');
|
numericReq.classList.remove("invalid");
|
||||||
numericReq.classList.add('valid');
|
numericReq.classList.add("valid");
|
||||||
numericReq.querySelector('i').classList.remove('fa-circle');
|
numericReq.querySelector("i").classList.remove("fa-circle");
|
||||||
numericReq.querySelector('i').classList.add('fa-check');
|
numericReq.querySelector("i").classList.add("fa-check");
|
||||||
} else {
|
} else {
|
||||||
numericReq.classList.remove('valid');
|
numericReq.classList.remove("valid");
|
||||||
numericReq.classList.add('invalid');
|
numericReq.classList.add("invalid");
|
||||||
numericReq.querySelector('i').classList.remove('fa-check');
|
numericReq.querySelector("i").classList.remove("fa-check");
|
||||||
numericReq.querySelector('i').classList.add('fa-circle');
|
numericReq.querySelector("i").classList.add("fa-circle");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Common password check (basic)
|
// Common password check (basic)
|
||||||
const commonReq = document.getElementById('req-common');
|
const commonReq = document.getElementById("req-common");
|
||||||
const commonPasswords = ['password', '12345678', 'qwerty', 'letmein'];
|
const commonPasswords = ["password", "12345678", "qwerty", "letmein"];
|
||||||
if (!commonPasswords.includes(password.toLowerCase())) {
|
if (!commonPasswords.includes(password.toLowerCase())) {
|
||||||
commonReq.classList.remove('invalid');
|
commonReq.classList.remove("invalid");
|
||||||
commonReq.classList.add('valid');
|
commonReq.classList.add("valid");
|
||||||
commonReq.querySelector('i').classList.remove('fa-circle');
|
commonReq.querySelector("i").classList.remove("fa-circle");
|
||||||
commonReq.querySelector('i').classList.add('fa-check');
|
commonReq.querySelector("i").classList.add("fa-check");
|
||||||
} else {
|
} else {
|
||||||
commonReq.classList.remove('valid');
|
commonReq.classList.remove("valid");
|
||||||
commonReq.classList.add('invalid');
|
commonReq.classList.add("invalid");
|
||||||
commonReq.querySelector('i').classList.remove('fa-check');
|
commonReq.querySelector("i").classList.remove("fa-check");
|
||||||
commonReq.querySelector('i').classList.add('fa-circle');
|
commonReq.querySelector("i").classList.add("fa-circle");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validatePasswordMatch() {
|
function validatePasswordMatch() {
|
||||||
const password1 = document.getElementById('id_password1').value;
|
const password1 = document.getElementById("id_password1").value;
|
||||||
const password2 = document.getElementById('id_password2').value;
|
const password2 = document.getElementById("id_password2").value;
|
||||||
const password2Input = document.getElementById('id_password2');
|
const password2Input = document.getElementById("id_password2");
|
||||||
|
|
||||||
if (password2.length > 0) {
|
if (password2.length > 0) {
|
||||||
if (password1 === password2) {
|
if (password1 === password2) {
|
||||||
password2Input.classList.remove('border-red-500');
|
password2Input.classList.remove("border-red-500");
|
||||||
password2Input.classList.add('border-green-500');
|
password2Input.classList.add("border-green-500");
|
||||||
} else {
|
} else {
|
||||||
password2Input.classList.remove('border-green-500');
|
password2Input.classList.remove("border-green-500");
|
||||||
password2Input.classList.add('border-red-500');
|
password2Input.classList.add("border-red-500");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
password2Input.classList.remove('border-green-500', 'border-red-500');
|
password2Input.classList.remove("border-green-500", "border-red-500");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user