From a0a170ae9666f5ea46c80ccf2cbdf9bb733fe18c Mon Sep 17 00:00:00 2001
From: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date: Wed, 26 Jan 2022 13:04:36 +0100
Subject: [PATCH] misc: use idp_service_and_next_params (#60165)

---
 templates/includes/user-info.html                              | 2 +-
 templates/variants/metz-metropole-2019/includes/user-info.html | 2 +-
 templates/variants/sables-d-olonne-2022/includes/nav.html      | 2 +-
 templates/variants/strasbourg-2018/combo/page_template.html    | 2 +-
 templates/variants/toodego/wcs/base.html                       | 2 +-
 templates/variants/toulouse-metropole/includes/nav.html        | 2 +-
 templates/variants/villeneuve-dascq/includes/user-info.html    | 2 +-
 templates/variants/villeurbanne-2018/user_info.html            | 2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/templates/includes/user-info.html b/templates/includes/user-info.html
index 026bbfd0..c203f041 100644
--- a/templates/includes/user-info.html
+++ b/templates/includes/user-info.html
@@ -6,7 +6,7 @@
 {% skeleton_extra_placeholder user-info %}
   {% if user.is_authenticated %}
   <span class="logged-in">
-    {% if idp_account_url %}<a class="account-link" href="{{idp_account_url}}">{% endif %}
+    {% if idp_account_url %}<a class="account-link" href="{{idp_account_url}}?{{idp_service_and_next_params}}">{% endif %}
     <span class="connected-user">{% block user-info-user-name %}{{user.first_name}} {{user.last_name}}{% endblock %}</span>{% if idp_account_url %}</a>{% endif %}
     <a accesskey="o" class="logout" href="{% url 'auth_logout' %}">{% block user-info-logout-label %}Déconnexion{% endblock %}</a>
   </span>
diff --git a/templates/variants/metz-metropole-2019/includes/user-info.html b/templates/variants/metz-metropole-2019/includes/user-info.html
index 698af43c..b3a27a54 100644
--- a/templates/variants/metz-metropole-2019/includes/user-info.html
+++ b/templates/variants/metz-metropole-2019/includes/user-info.html
@@ -3,7 +3,7 @@
 {% block user-info %}
 {% skeleton_extra_placeholder user-info %}
   {% if user.is_authenticated %}
-  <a class="hello" href="{{idp_account_url}}"><span>Bonjour {{ user.first_name }}</span></a><span> -
+  <a class="hello" href="{{idp_account_url}}?{{idp_service_and_next_params}}"><span>Bonjour {{ user.first_name }}</span></a><span> -
   </span><a accesskey="o" class="logout" href="{% url 'auth_logout' %}">Déconnexion</a>
   {% else %}
   <a class="login" href="{% url 'auth_login' %}">Connexion</a>
diff --git a/templates/variants/sables-d-olonne-2022/includes/nav.html b/templates/variants/sables-d-olonne-2022/includes/nav.html
index ec9fa80f..0e0ffcb8 100644
--- a/templates/variants/sables-d-olonne-2022/includes/nav.html
+++ b/templates/variants/sables-d-olonne-2022/includes/nav.html
@@ -5,7 +5,7 @@
 {{ block.super }}
 {% skeleton_extra_placeholder user-info %}
 {% if user.is_authenticated %}
-<li><a class="account-link" href="{{idp_account_url}}">{{user.first_name}} {{user.last_name}}</a></li>
+<li><a class="account-link" href="{{idp_account_url}}?{{idp_service_and_next_params}}">{{user.first_name}} {{user.last_name}}</a></li>
 <li><a accesskey="o" class="logout" href="{% url 'auth_logout' %}">Déconnexion</a></li>
 {% else %}
 {% firstof registration_url idp_registration_url as registration_url %}
diff --git a/templates/variants/strasbourg-2018/combo/page_template.html b/templates/variants/strasbourg-2018/combo/page_template.html
index 4f284a45..dc96f8d6 100644
--- a/templates/variants/strasbourg-2018/combo/page_template.html
+++ b/templates/variants/strasbourg-2018/combo/page_template.html
@@ -37,7 +37,7 @@ if ($('#user-files').length) {
 {% block account %}
 {% skeleton_extra_placeholder account %}
         {% if user.is_authenticated %}
-        <a href="{{ idp_account_url}}" class="nav-account nav-btn" title="Mon compte">
+        <a href="{{ idp_account_url}}?{{idp_service_and_next_params}}" class="nav-account nav-btn" title="Mon compte">
             <span class="flexbox">
                 <span class="picto"></span>
                 <span class="text">{{user.first_name}} {{user.last_name|slice:":1"}}.</span>
diff --git a/templates/variants/toodego/wcs/base.html b/templates/variants/toodego/wcs/base.html
index b775b34d..461cc1a5 100644
--- a/templates/variants/toodego/wcs/base.html
+++ b/templates/variants/toodego/wcs/base.html
@@ -17,7 +17,7 @@
 {% block user-info %}
   {% if session_user %}
   <span class="logged-in">
-    {% if idp_account_url %}<a href="{{idp_account_url}}">{% endif %}
+    {% if idp_account_url %}<a href="{{idp_account_url}}?{{idp_service_and_next_params}}">{% endif %}
     <span class="connected-user">{{session_user_display_name}}</span>{% if idp_account_url %}</a>{% endif %}
     <a accesskey="o" class="logout" href="{{root_url}}logout">D&eacute;connexion</a>
   </span>
diff --git a/templates/variants/toulouse-metropole/includes/nav.html b/templates/variants/toulouse-metropole/includes/nav.html
index f4728ad5..9aa54bdc 100644
--- a/templates/variants/toulouse-metropole/includes/nav.html
+++ b/templates/variants/toulouse-metropole/includes/nav.html
@@ -6,7 +6,7 @@
 {% skeleton_extra_placeholder user-info %}
           {% if user.is_authenticated %}
           <span class="logged-in">
-            {% if idp_account_url %}<a href="{{idp_account_url}}">{% endif %}
+            {% if idp_account_url %}<a href="{{idp_account_url}}?{{idp_service_and_next_params}}">{% endif %}
             <span class="connected-user">{{user.first_name}} {{user.last_name}}</span>{% if idp_account_url %}</a>{% endif %}
             <a accesskey="o" class="logout pk-button" href="{% url 'auth_logout' %}">D&eacute;connexion</a>
           </span>
diff --git a/templates/variants/villeneuve-dascq/includes/user-info.html b/templates/variants/villeneuve-dascq/includes/user-info.html
index 85ae5c5f..de3b1eac 100644
--- a/templates/variants/villeneuve-dascq/includes/user-info.html
+++ b/templates/variants/villeneuve-dascq/includes/user-info.html
@@ -8,7 +8,7 @@
   {% skeleton_extra_placeholder user-info %}
   {% if user.is_authenticated %}
   <span class="logged-in">
-    {% if idp_account_url %}<a class="account-link" href="{{idp_account_url}}">{% endif %}
+    {% if idp_account_url %}<a class="account-link" href="{{idp_account_url}}?{{idp_service_and_next_params}}">{% endif %}
     <span class="connected-user">{% block user-info-user-name %}{{user.first_name}} {{user.last_name}}{% endblock %}</span>{% if idp_account_url %}</a>{% endif %}
     <a accesskey="o" class="logout" href="{% url 'auth_logout' %}">{% block user-info-logout-label %}Déconnexion{% endblock %}</a>
   </span>
diff --git a/templates/variants/villeurbanne-2018/user_info.html b/templates/variants/villeurbanne-2018/user_info.html
index 7dfcc4ff..cbc7d82e 100644
--- a/templates/variants/villeurbanne-2018/user_info.html
+++ b/templates/variants/villeurbanne-2018/user_info.html
@@ -1,5 +1,5 @@
 {% if user.is_authenticated %}
-  {% if idp_account_url %}<a href="{{idp_account_url}}" role="button" class="btn-account">{% endif %}
+  {% if idp_account_url %}<a href="{{idp_account_url}}?{{idp_service_and_next_params}}" role="button" class="btn-account">{% endif %}
   Mon compte{% if idp_account_url %}</a>{% endif %}
   <a accesskey="o" class="logout btn-logout" href="{% url 'auth_logout' %}" data-placement="bottom">
     <span class="fa fa-sign-out" aria-hidden="true"></span>
-- 
2.30.2

