From 00e588bdb206aaa5980013f3099954e94aeeca9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@entrouvert.com>
Date: Sat, 28 Jan 2023 11:47:47 +0100
Subject: [PATCH] templates: complete and update title block usage (#73950)

---
 .../idp/saml/templates/idp/saml/unknown_provider.html         | 4 ++++
 src/authentic2/saml/templates/saml/post_form.html             | 4 ++--
 src/authentic2/templates/authentic2/accounts.html             | 4 ++--
 .../templates/authentic2/accounts_delete_request.html         | 4 ++--
 .../templates/authentic2/accounts_delete_validation.html      | 4 ++--
 src/authentic2/templates/authentic2/accounts_edit.html        | 4 ++--
 src/authentic2/templates/authentic2/base.html                 | 2 +-
 src/authentic2/templates/authentic2/change_email.html         | 4 ++--
 src/authentic2/templates/authentic2/consents.html             | 4 ++--
 .../templates/authentic2/display_message_and_continue.html    | 2 ++
 src/authentic2/templates/authentic2/homepage.html             | 2 ++
 src/authentic2/templates/authentic2/login.html                | 4 ++--
 src/authentic2/templates/authentic2/logout.html               | 4 ++--
 src/authentic2/templates/authentic2/logout_confirm.html       | 1 -
 src/authentic2/templates/authentic2/unauthorized.html         | 4 ++--
 src/authentic2/templates/error.html                           | 2 ++
 .../templates/registration/activation_complete.html           | 4 ++++
 .../templates/registration/password_change_form.html          | 4 ++--
 .../templates/registration/password_reset_instructions.html   | 2 +-
 .../templates/registration/sms_input_registration_code.html   | 2 +-
 .../templates/authentic2_idp_oidc/authorization.html          | 4 ++++
 21 files changed, 43 insertions(+), 26 deletions(-)

diff --git a/src/authentic2/idp/saml/templates/idp/saml/unknown_provider.html b/src/authentic2/idp/saml/templates/idp/saml/unknown_provider.html
index 3db35c127..d56c13cfe 100644
--- a/src/authentic2/idp/saml/templates/idp/saml/unknown_provider.html
+++ b/src/authentic2/idp/saml/templates/idp/saml/unknown_provider.html
@@ -1,6 +1,10 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
+{% block title %}
+  {% trans "Unknown provider" %}
+{% endblock %}
+
 {% block content %}
   <p>
     {% blocktrans trimmed %}We were unable to load provider <tt>{{ entity_id }}</tt>.{% endblocktrans %}
diff --git a/src/authentic2/saml/templates/saml/post_form.html b/src/authentic2/saml/templates/saml/post_form.html
index 4a2008023..74789185a 100644
--- a/src/authentic2/saml/templates/saml/post_form.html
+++ b/src/authentic2/saml/templates/saml/post_form.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
-  {{ block.super }} - {{ title }}
+{% block title %}
+  {{ title }}
 {% endblock %}
 
 {% block content %}
diff --git a/src/authentic2/templates/authentic2/accounts.html b/src/authentic2/templates/authentic2/accounts.html
index 00061cb00..f847b88bb 100644
--- a/src/authentic2/templates/authentic2/accounts.html
+++ b/src/authentic2/templates/authentic2/accounts.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/accounts_delete_request.html b/src/authentic2/templates/authentic2/accounts_delete_request.html
index 70f349276..57c5ff99e 100644
--- a/src/authentic2/templates/authentic2/accounts_delete_request.html
+++ b/src/authentic2/templates/authentic2/accounts_delete_request.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/accounts_delete_validation.html b/src/authentic2/templates/authentic2/accounts_delete_validation.html
index 2d0f472d7..9ad363f26 100644
--- a/src/authentic2/templates/authentic2/accounts_delete_validation.html
+++ b/src/authentic2/templates/authentic2/accounts_delete_validation.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/accounts_edit.html b/src/authentic2/templates/authentic2/accounts_edit.html
index 29346b422..bacc55347 100644
--- a/src/authentic2/templates/authentic2/accounts_edit.html
+++ b/src/authentic2/templates/authentic2/accounts_edit.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/base.html b/src/authentic2/templates/authentic2/base.html
index bd56e803e..89d07bdd4 100644
--- a/src/authentic2/templates/authentic2/base.html
+++ b/src/authentic2/templates/authentic2/base.html
@@ -1,7 +1,7 @@
 {% extends "gadjo/base.html" %}
 {% load i18n %}
 
-{% block page-title %}Authentic2 - {{ request.get_host }}{% endblock %}
+{% block page-title %}Authentic2 - {{ request.get_host }} - {% block title %}{% endblock %}{% endblock %}
 
 {% block site-title %}Authentic2 - {{ request.get_host }}{% endblock %}
 
diff --git a/src/authentic2/templates/authentic2/change_email.html b/src/authentic2/templates/authentic2/change_email.html
index f4b63d180..cfaf98deb 100644
--- a/src/authentic2/templates/authentic2/change_email.html
+++ b/src/authentic2/templates/authentic2/change_email.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/consents.html b/src/authentic2/templates/authentic2/consents.html
index c7db9ecd2..b39cf436d 100644
--- a/src/authentic2/templates/authentic2/consents.html
+++ b/src/authentic2/templates/authentic2/consents.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/authentic2/display_message_and_continue.html b/src/authentic2/templates/authentic2/display_message_and_continue.html
index 2a94e14d3..81f9d2319 100644
--- a/src/authentic2/templates/authentic2/display_message_and_continue.html
+++ b/src/authentic2/templates/authentic2/display_message_and_continue.html
@@ -1,6 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
+{% block title %}{% trans "Continue" %}{% endblock %}
+
 {% block content %}
   <div class="a2-continue">
     <a id="a2-continue" href="{{ url }}">{% trans "Continue" %}</a>
diff --git a/src/authentic2/templates/authentic2/homepage.html b/src/authentic2/templates/authentic2/homepage.html
index 3eeaf2d88..ea851b0af 100644
--- a/src/authentic2/templates/authentic2/homepage.html
+++ b/src/authentic2/templates/authentic2/homepage.html
@@ -1,6 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
+{% block title %}{% trans "Home" %}{% endblock %}
+
 {% block appbar %}
   {{ block.super }}
   {% if perms.any.a2_rbac.search_organizationalunit or perms.any.custom_user.search_user or perms.any.a2_rbac.search_role or perms.any.authentic2.search_service %}
diff --git a/src/authentic2/templates/authentic2/login.html b/src/authentic2/templates/authentic2/login.html
index 1980626fd..30384c627 100644
--- a/src/authentic2/templates/authentic2/login.html
+++ b/src/authentic2/templates/authentic2/login.html
@@ -3,8 +3,8 @@
 
 {% block gadjo-jquery %}{% endblock %}
 
-{% block page-title %}
-  {{ block.super}} - {% trans "Login" %}
+{% block title %}
+  {% trans "Login" %}
 {% endblock %}
 
 {% block breadcrumb %}{% endblock %}
diff --git a/src/authentic2/templates/authentic2/logout.html b/src/authentic2/templates/authentic2/logout.html
index 88b0e6124..8258ec688 100644
--- a/src/authentic2/templates/authentic2/logout.html
+++ b/src/authentic2/templates/authentic2/logout.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo static %}
 
-{% block page-title %}
-  {{ block.super }} - {% trans "Logout" %}
+{% block title %}
+  {% trans "Logout" %}
 {% endblock %}
 
 {% block bodyargs %}
diff --git a/src/authentic2/templates/authentic2/logout_confirm.html b/src/authentic2/templates/authentic2/logout_confirm.html
index 3e2507a25..3edd0f5b5 100644
--- a/src/authentic2/templates/authentic2/logout_confirm.html
+++ b/src/authentic2/templates/authentic2/logout_confirm.html
@@ -1,7 +1,6 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-
 {% block title %}
   {% trans "Logout" %}
 {% endblock %}
diff --git a/src/authentic2/templates/authentic2/unauthorized.html b/src/authentic2/templates/authentic2/unauthorized.html
index de890f2ea..e18c310d5 100644
--- a/src/authentic2/templates/authentic2/unauthorized.html
+++ b/src/authentic2/templates/authentic2/unauthorized.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
-  {{ block.super }} - {% trans "Access denied" %}
+{% block title %}
+  {% trans "Access denied" %}
 {% endblock %}
 
 {% block content %}
diff --git a/src/authentic2/templates/error.html b/src/authentic2/templates/error.html
index 479c01317..f442ae77b 100644
--- a/src/authentic2/templates/error.html
+++ b/src/authentic2/templates/error.html
@@ -1,6 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
+{% block title %}{% trans "Error" %}{% endblock %}
+
 {% block extrascripts %}
   {{ block.super }}
   <script src="{% xstatic 'jquery' 'jquery.min.js' %}"></script>
diff --git a/src/authentic2/templates/registration/activation_complete.html b/src/authentic2/templates/registration/activation_complete.html
index 6cf7d795a..a2c2b666f 100644
--- a/src/authentic2/templates/registration/activation_complete.html
+++ b/src/authentic2/templates/registration/activation_complete.html
@@ -1,6 +1,10 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n %}
 
+{% block title %}
+  {% trans "Account successfully activated" %}
+{% endblock %}
+
 {% block content %}
   {% trans "Your account is now activated" %}
 {% endblock %}
diff --git a/src/authentic2/templates/registration/password_change_form.html b/src/authentic2/templates/registration/password_change_form.html
index 68853fbd5..89b2b7728 100644
--- a/src/authentic2/templates/registration/password_change_form.html
+++ b/src/authentic2/templates/registration/password_change_form.html
@@ -1,8 +1,8 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
-  {{ block.super }} - {{ view.title }}
+{% block title %}
+  {{ view.title }}
 {% endblock %}
 
 {% block breadcrumb %}
diff --git a/src/authentic2/templates/registration/password_reset_instructions.html b/src/authentic2/templates/registration/password_reset_instructions.html
index d92d34d05..1a37b231c 100644
--- a/src/authentic2/templates/registration/password_reset_instructions.html
+++ b/src/authentic2/templates/registration/password_reset_instructions.html
@@ -1,7 +1,7 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
+{% block title %}
   {% trans "Password reset instructions" %}
 {% endblock %}
 
diff --git a/src/authentic2/templates/registration/sms_input_registration_code.html b/src/authentic2/templates/registration/sms_input_registration_code.html
index 5b378acec..55b12e157 100644
--- a/src/authentic2/templates/registration/sms_input_registration_code.html
+++ b/src/authentic2/templates/registration/sms_input_registration_code.html
@@ -1,7 +1,7 @@
 {% extends "authentic2/base-page.html" %}
 {% load i18n gadjo %}
 
-{% block page-title %}
+{% block title %}
   {{ view.title }}
 {% endblock %}
 
diff --git a/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html b/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
index c59e8fc24..ef61ee728 100644
--- a/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
+++ b/src/authentic2_idp_oidc/templates/authentic2_idp_oidc/authorization.html
@@ -6,6 +6,10 @@
   <link rel="stylesheet" type="text/css" href="{% static 'authentic2_idp_oidc/css/style.css' %}"></link>
 {% endblock %}
 
+{% block title %}
+  {% trans "Authentication access check" %}
+{% endblock %}
+
 {% block beforecontent %}
   {% include "authentic2/service_info_fragment.html" %}
 {% endblock %}
-- 
2.39.1

