From 985bd2cd59bf3f0dce1f3022a31e5bbb7cced094 Mon Sep 17 00:00:00 2001 From: Joel Falknau Date: Wed, 11 Mar 2026 16:10:33 +1000 Subject: [PATCH] refactor templinks to still include informative login step --- .../templates/services/mumble/base.html | 2 +- .../{link.html => templinks/link_sso.html} | 20 ++++----- .../mumble/{ => templinks}/login.html | 44 +------------------ .../mumble/{ => templinks}/templinks.html | 2 +- allianceauth/templates/bundles/moment-js.html | 2 +- 5 files changed, 15 insertions(+), 55 deletions(-) rename allianceauth/services/modules/mumble/templates/services/mumble/{link.html => templinks/link_sso.html} (84%) rename allianceauth/services/modules/mumble/templates/services/mumble/{ => templinks}/login.html (56%) rename allianceauth/services/modules/mumble/templates/services/mumble/{ => templinks}/templinks.html (99%) diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/base.html b/allianceauth/services/modules/mumble/templates/services/mumble/base.html index 590da6fa..2ed5a3c3 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/base.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/base.html @@ -16,4 +16,4 @@ {% block mumble %}{% endblock mumble %} -{% endblock %} +{% endblock content %} diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/link.html b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/link_sso.html similarity index 84% rename from allianceauth/services/modules/mumble/templates/services/mumble/link.html rename to allianceauth/services/modules/mumble/templates/services/mumble/templinks/link_sso.html index 55db3fe5..33787202 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/link.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/link_sso.html @@ -6,20 +6,20 @@ {% block mumble %}

- {{ link.creator.character_name }} + {{ temp_user.templink.creator.character_name }}

- {% blocktranslatelate with character=link.creator.character_name %} + {% blocktranslate with character=temp_user.templink.creator.character_name %} {{ character }} has invited you to join Mumble! - {% endblocktranslatelate %} + {% endblocktranslate %}

- {% translate "Time Remaining" %}: + {% translate "Time Remaining" %}:

- {% translate "Link Ref" %}: {{ link.link_ref }} + {% translate "Link Ref" %}: {{ temp_user.templink.link_ref }}

@@ -27,7 +27,7 @@ {% translate 'Mumble' %} - {% translate "Click to Join Mumble as" %}: {{ temp_user.name }} + {% translate "Click to Join Mumble as" %}: {{ temp_user.display_name }}

@@ -44,13 +44,13 @@ {% translate "If you have problems with the application link above, please use the following in Mumble's connection dialog." %}

- {% translate "Mumble URL" %}: {{ mumble }} + {% translate "Mumble URL" %}: {{ mumble_url }}

{% translate "Username" %}: {{ temp_user.username }}

- {% translate "Password" %}: {{ temp_user.password }} + {% translate "Password" %}: {{ password }}

@@ -65,8 +65,8 @@ /* global moment */ const locale = '{{ LANGUAGE_CODE }}'; const timers = [{ - 'id': '{{ link.link_ref }}', - 'targetDate': moment('{{ link.expires| date:"c" }}'), + 'id': '{{ temp_user.templink.link_ref }}', + 'targetDate': moment('{{ temp_user.templink.expires| date:"c" }}'), 'expired': false }]; diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/login.html b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/login.html similarity index 56% rename from allianceauth/services/modules/mumble/templates/services/mumble/login.html rename to allianceauth/services/modules/mumble/templates/services/mumble/templinks/login.html index a327ced9..f8e0ccdd 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/login.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/login.html @@ -11,9 +11,9 @@

- {% blocktranslatelate with character=link.creator.character_name %} + {% blocktranslate with character=link.creator.character_name %} {{ character }} has invited you to join Mumble! - {% endblocktranslatelate %} + {% endblocktranslate %}

@@ -35,46 +35,6 @@ > - -

-
-
-
-
-
{% translate "Non SSO Login" %}
-
- -
-
-
- {% csrf_token %} - - - -

- {% translate "If you cannot SSO with your EVE character, You can enter your own details below." %} -

- -

- - -

- -

- - -

- - -
-
-
-
-
-
-
{% include "bundles/moment-js.html" with locale=True %} diff --git a/allianceauth/services/modules/mumble/templates/services/mumble/templinks.html b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/templinks.html similarity index 99% rename from allianceauth/services/modules/mumble/templates/services/mumble/templinks.html rename to allianceauth/services/modules/mumble/templates/services/mumble/templinks/templinks.html index 0da8824e..99e395a0 100644 --- a/allianceauth/services/modules/mumble/templates/services/mumble/templinks.html +++ b/allianceauth/services/modules/mumble/templates/services/mumble/templinks/templinks.html @@ -48,7 +48,7 @@

{% translate "Your link will be displayed on the next page for an easy copy and paste." %}

-
+ {% csrf_token %}
diff --git a/allianceauth/templates/bundles/moment-js.html b/allianceauth/templates/bundles/moment-js.html index c1d55df4..3ddbb030 100644 --- a/allianceauth/templates/bundles/moment-js.html +++ b/allianceauth/templates/bundles/moment-js.html @@ -1,7 +1,7 @@ {% load aa_i18n %} - + {% if locale and LANGUAGE_CODE != 'en' %}