From 16c1cf70c4bade865fae90c0d42912f1b98e1331 Mon Sep 17 00:00:00 2001 From: Johan Kromhout Date: Tue, 21 Jan 2025 12:12:01 +0100 Subject: [PATCH] Improve IDP debug email Prior to this change, the idp debug email was difficult to read, especially when there was no translated attribute name available. This change improves the formatting and readability of the mail. Fixes https://github.com/OpenConext/OpenConext-engineblock/issues/1330 --- .../Authentication/View/Proxy/debug-idp-mail.txt.twig | 6 +++++- .../Authentication/View/Proxy/debug-idp-mail.txt.twig | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/theme/base/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig b/theme/base/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig index e5ec76f89c..49959c37ec 100644 --- a/theme/base/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig +++ b/theme/base/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig @@ -17,10 +17,12 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }} {% endfor %} + {% for attributeName, attributeValues in attributes %} "{{ attributeName }}" ---------------------------------------------------------- -Name: {{ attributeName(attributeName, 'en') }} + +English name: {{ attributeName(attributeName, 'en') }} Values: {% for attributeValue in attributeValues %} @@ -34,8 +36,10 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro {% for warning in validationResult.warnings(attributeName) %} Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }} {% endfor %} + {% endfor %} + Raw data ======== diff --git a/theme/openconext/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig b/theme/openconext/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig index e5ec76f89c..49959c37ec 100644 --- a/theme/openconext/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig +++ b/theme/openconext/templates/modules/Authentication/View/Proxy/debug-idp-mail.txt.twig @@ -17,10 +17,12 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }} {% endfor %} + {% for attributeName, attributeValues in attributes %} "{{ attributeName }}" ---------------------------------------------------------- -Name: {{ attributeName(attributeName, 'en') }} + +English name: {{ attributeName(attributeName, 'en') }} Values: {% for attributeValue in attributeValues %} @@ -34,8 +36,10 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro {% for warning in validationResult.warnings(attributeName) %} Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }} {% endfor %} + {% endfor %} + Raw data ========