diff --git a/apps/registration/templates/registration/login_modal.html b/apps/registration/templates/registration/login_modal.html
new file mode 100644
index 0000000..6601779
--- /dev/null
+++ b/apps/registration/templates/registration/login_modal.html
@@ -0,0 +1,21 @@
+{% load crispy_forms_filters i18n %}
+
+
\ No newline at end of file
diff --git a/templates/base.html b/templates/base.html
index 23dff3d..b08b694 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -102,7 +102,9 @@
{% trans "Register" %}
- {% trans "Log in" %}
+
+ {% trans "Log in" %}
+
{% else %}
@@ -159,6 +161,7 @@
+{% include "registration/login_modal.html" %}
{% if user.is_authenticated %}
{% include "participation/create_team_modal.html" %}
{% include "participation/join_team_modal.html" %}
@@ -168,6 +171,11 @@
CSRF_TOKEN = "{{ csrf_token }}";
$(document).ready(function () {
+ $('a[data-target="#loginModal"]').click(function() {
+ let modalBody = $("#loginModal div.modal-body");
+ if (!modalBody.html().trim())
+ modalBody.load("{% url "login" %} #form-content")
+ });
$('a[data-target="#createTeamModal"]').click(function() {
let modalBody = $("#createTeamModal div.modal-body");
if (!modalBody.html().trim())
diff --git a/apps/registration/templates/registration/login.html b/templates/registration/login.html
similarity index 75%
rename from apps/registration/templates/registration/login.html
rename to templates/registration/login.html
index 64c5c26..db50a06 100644
--- a/apps/registration/templates/registration/login.html
+++ b/templates/registration/login.html
@@ -17,9 +17,11 @@ SPDX-License-Identifier: GPL-2.0-or-later
{% endif %}