From 3f0588f947aa45e7a76526f2528c46db20a76984 Mon Sep 17 00:00:00 2001
From: pac7 <47831526-pac7@users.noreply.replit.com>
Date: Sun, 21 Sep 2025 17:15:36 +0000
Subject: [PATCH] Add a new reusable authentication modal component to the
platform
Integrate a new Django component for the authentication modal, ensuring parity with existing React frontend functionality, and add a corresponding test view for comparison.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dcfff319-6e91-4220-98a9-8295b87755b7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
---
.../templates/components/auth/auth-modal.html | 2 +-
backend/templates/cotton/auth_modal.html | 397 ++++++++++++++
.../templates/test_auth_modal_comparison.html | 511 ++++++++++++++++++
backend/thrillwiki/urls.py | 3 +-
backend/thrillwiki/views.py | 8 +
5 files changed, 919 insertions(+), 2 deletions(-)
create mode 100644 backend/templates/cotton/auth_modal.html
create mode 100644 backend/templates/test_auth_modal_comparison.html
diff --git a/backend/templates/components/auth/auth-modal.html b/backend/templates/components/auth/auth-modal.html
index b8c3137a..523e3048 100644
--- a/backend/templates/components/auth/auth-modal.html
+++ b/backend/templates/components/auth/auth-modal.html
@@ -12,7 +12,7 @@ Matches React frontend AuthDialog functionality with modal-based auth
x-data="authModal"
x-show="open"
x-cloak
- x-init="window.authModal = $data"
+ x-init="window.authModalOriginal = $data"
class="fixed inset-0 z-50 flex items-center justify-center"
@keydown.escape.window="close()"
>
diff --git a/backend/templates/cotton/auth_modal.html b/backend/templates/cotton/auth_modal.html
new file mode 100644
index 00000000..a2348e14
--- /dev/null
+++ b/backend/templates/cotton/auth_modal.html
@@ -0,0 +1,397 @@
+{% comment %}
+Auth Modal Component - Django Cotton Version
+Enhanced Authentication Modal Component that matches React frontend AuthDialog functionality
+Preserves EXACT Alpine.js behavior, styling, and functionality
+
+Usage:
+ {{ login_subtitle }} +
++ {{ register_subtitle }} +
+Comparing original include method vs new cotton component for Auth Modal with full Alpine.js functionality
+ +