diff --git a/src/servala/core/models/organization.py b/src/servala/core/models/organization.py index 57cd660..855e4f0 100644 --- a/src/servala/core/models/organization.py +++ b/src/servala/core/models/organization.py @@ -3,8 +3,8 @@ import urlman from django.conf import settings from django.db import models, transaction from django.utils.functional import cached_property -from django.utils.text import slugify from django.utils.safestring import mark_safe +from django.utils.text import slugify from django.utils.translation import gettext_lazy as _ from django_scopes import ScopedManager, scopes_disabled diff --git a/src/servala/frontend/templates/account/login.html b/src/servala/frontend/templates/account/login.html index 233118b..58cd49b 100644 --- a/src/servala/frontend/templates/account/login.html +++ b/src/servala/frontend/templates/account/login.html @@ -1,21 +1,22 @@ {% extends "frontend/base.html" %} {% load static i18n %} {% load allauth account socialaccount %} - {% block html_title %} {% translate "Sign in" %} {% endblock html_title %} - {% block page_title %} {% translate "Welcome to Servala" %} {% endblock page_title %} - {% block card_header %} -
- Servala +
+ Servala
{% endblock card_header %} - {% block card_content %} {% if SOCIALACCOUNT_ENABLED %} @@ -24,9 +25,10 @@
{% translate "Ready to get started?" %}
-

{% translate "Sign in to access your managed service instances and the Servala service catalog" %}

+

+ {% translate "Sign in to access your managed service instances and the Servala service catalog" %} +

- {% for provider in socialaccount_providers %} {% provider_login_url provider process=process scope=scope auth_params=auth_params as href %}
@@ -35,7 +37,9 @@
@@ -43,7 +47,6 @@
{% endif %} {% endif %} -
@@ -72,8 +75,8 @@
- {% translate "Learn more" %} @@ -82,7 +85,6 @@
-
@@ -96,7 +98,6 @@
-
diff --git a/src/servala/frontend/templates/frontend/base.html b/src/servala/frontend/templates/frontend/base.html index c2d9285..990dc17 100644 --- a/src/servala/frontend/templates/frontend/base.html +++ b/src/servala/frontend/templates/frontend/base.html @@ -5,13 +5,18 @@ - + - {% block html_title %}Dashboard{% endblock html_title %} – Servala + + {% block html_title %} + Dashboard + {% endblock html_title %} + – Servala diff --git a/src/servala/frontend/templates/frontend/profile.html b/src/servala/frontend/templates/frontend/profile.html index dc12100..b9c1799 100644 --- a/src/servala/frontend/templates/frontend/profile.html +++ b/src/servala/frontend/templates/frontend/profile.html @@ -116,7 +116,8 @@ {% endblocktranslate %}

- {% translate "VSHN Account Console" %} diff --git a/src/servala/frontend/templates/includes/k8s_error.html b/src/servala/frontend/templates/includes/k8s_error.html index f97474d..5707dcc 100644 --- a/src/servala/frontend/templates/includes/k8s_error.html +++ b/src/servala/frontend/templates/includes/k8s_error.html @@ -1,14 +1,12 @@ {% if show_error %} -
- {% if has_list %} - {% if message %}{{ message }}{% endif %} -
    - {% for error in errors %} -
  • {{ error }}
  • - {% endfor %} -
- {% else %} - {{ message }} - {% endif %} -
+
+ {% if has_list %} + {% if message %}{{ message }}{% endif %} +
    + {% for error in errors %}
  • {{ error }}
  • {% endfor %} +
+ {% else %} + {{ message }} + {% endif %} +
{% endif %} diff --git a/src/servala/frontend/templates/includes/message.html b/src/servala/frontend/templates/includes/message.html index d5debc9..278c009 100644 --- a/src/servala/frontend/templates/includes/message.html +++ b/src/servala/frontend/templates/includes/message.html @@ -1,28 +1,29 @@ -
+
{{ message }}
- \ No newline at end of file + document.addEventListener('DOMContentLoaded', function() { + const alert = document.getElementById('auto-dismiss-alert-{{ forloop.counter0|default:' + 0 ' }}'); + if (alert && !alert.classList.contains('alert-danger')) { + setTimeout(function() { + let opacity = 1; + const fadeOutInterval = setInterval(function() { + if (opacity > 0.05) { + opacity -= 0.05; + alert.style.opacity = opacity; + } else { + clearInterval(fadeOutInterval); + const bsAlert = new bootstrap.Alert(alert); + bsAlert.close(); + } + }, 25); + }, 5000); + } + }); + diff --git a/src/servala/frontend/templatetags/error_filters.py b/src/servala/frontend/templatetags/error_filters.py index 18c4c4d..410d49a 100644 --- a/src/servala/frontend/templatetags/error_filters.py +++ b/src/servala/frontend/templatetags/error_filters.py @@ -3,6 +3,7 @@ Template filters for safe error formatting. """ import html + from django import template from django.utils.safestring import mark_safe diff --git a/src/servala/frontend/views/support.py b/src/servala/frontend/views/support.py index 9181c1e..6f4c4aa 100644 --- a/src/servala/frontend/views/support.py +++ b/src/servala/frontend/views/support.py @@ -52,7 +52,7 @@ class SupportView(OrganizationViewMixin, FormView): mark_safe( _( "There was an error submitting your support request. " - "Please try again or contact us directly at servala-support@vshn.ch." + 'Please try again or contact us directly at servala-support@vshn.ch.' ) ), )