From 7831179e92885e87236d784cdcf3a3946a8e466c Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:56:16 +0800 Subject: [PATCH 1/6] PR feedback: use correct escaping --- .../material/default/selectidp-links.twig | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/material/themes/material/default/selectidp-links.twig b/modules/material/themes/material/default/selectidp-links.twig index 51af837..9272dfb 100644 --- a/modules/material/themes/material/default/selectidp-links.twig +++ b/modules/material/themes/material/default/selectidp-links.twig @@ -10,7 +10,7 @@ const idpInput = document.createElement('input'); idpInput.type = 'hidden'; - idpInput.name = '{{ returnIDParam|e }}'; + idpInput.name = '{{ returnIDParam|e('js')|raw }}'; idpInput.value = id; document.querySelector('form').appendChild(idpInput); @@ -39,7 +39,7 @@ {% if not helpCenterUrl ?? '' is empty %} @@ -51,9 +51,9 @@ {% include 'announcement.twig' %}
- - - + + + {% for idp in idplist %}
From f6dcafaf7005b9bf2e24801067130021d97699c4 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:56:52 +0800 Subject: [PATCH 2/6] PR feedback: use the correct variable name `analyticsTrackingId` --- modules/material/themes/material/default/header.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/material/themes/material/default/header.twig b/modules/material/themes/material/default/header.twig index c26a7e1..a3f7927 100644 --- a/modules/material/themes/material/default/header.twig +++ b/modules/material/themes/material/default/header.twig @@ -7,13 +7,13 @@ {% if not (analyticsTrackingId ?? null) is empty %} - + {% endif %} From 9f0af8ec08e13c47c185832065790aec2c85f12f Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:20:41 +0800 Subject: [PATCH 3/6] PR feedback: add type="submit" to buttons --- .../material/expirychecker/about2expire.twig | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/modules/material/themes/material/expirychecker/about2expire.twig b/modules/material/themes/material/expirychecker/about2expire.twig index f009355..fdfbf40 100644 --- a/modules/material/themes/material/expirychecker/about2expire.twig +++ b/modules/material/themes/material/expirychecker/about2expire.twig @@ -6,45 +6,45 @@ {% include 'header.twig' %} -
-
-
+
+
+
{{ '{about2expire:header}'|trans }} -
-
-
- - {% for name, value in formData %} - - {% endfor %} +
+
+
+ + {% for name, value in formData %} + + {% endfor %} -

- {% if daysLeft < 2 %} - {{ '{about2expire:expiring_in_a_day}'|trans }} - {% else %} - {{ '{about2expire:expiring_soon}'|trans({'%daysLeft%': daysLeft}) }} - {% endif %} -

+

+ {% if daysLeft < 2 %} + {{ '{about2expire:expiring_in_a_day}'|trans }} + {% else %} + {{ '{about2expire:expiring_soon}'|trans({'%daysLeft%': daysLeft}) }} + {% endif %} +

-

- {{ '{about2expire:change_now}'|trans }} -

+

+ {{ '{about2expire:change_now}'|trans }} +

-
- +
+ - -
- -
+ +
+ + - {% include 'footer.twig' %} -
+ {% include 'footer.twig' %} + From 3e1e2442c9cb48d77a486893cb541df989168375 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:59:25 +0800 Subject: [PATCH 4/6] PR feedback: add type="submit" to buttons --- .../material/themes/material/mfa/prompt-for-mfa-manager.twig | 2 +- modules/material/themes/material/mfa/prompt-for-mfa-totp.twig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig index 22aa3ea..dfe3075 100644 --- a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig +++ b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig @@ -60,7 +60,7 @@
-
diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig b/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig index 5be2e29..7fd9a92 100644 --- a/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig +++ b/modules/material/themes/material/mfa/prompt-for-mfa-totp.twig @@ -58,7 +58,7 @@
-
From 82e1d70887d93ee063d3ff12601d8db929dfee97 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:22:33 +0800 Subject: [PATCH 5/6] PR feedback: add type="submit" to button --- .../material/expirychecker/expired.twig | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/modules/material/themes/material/expirychecker/expired.twig b/modules/material/themes/material/expirychecker/expired.twig index 04d83ac..071a814 100644 --- a/modules/material/themes/material/expirychecker/expired.twig +++ b/modules/material/themes/material/expirychecker/expired.twig @@ -6,31 +6,31 @@ {% include 'header.twig' %} -
-
-
+
+
+
{{ '{expired:header}'|trans }} -
-
-
-
- {% for name, value in formData %} - - {% endfor %} +
+
+
+ + {% for name, value in formData %} + + {% endfor %} -

- {{ '{expired:expired}'|trans }} -

+

+ {{ '{expired:expired}'|trans }} +

- - -
+ + + - {% include 'footer.twig' %} -
+ {% include 'footer.twig' %} + From 8341338c7793ed3e6794d46c198af54f945e98fa Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:58:30 +0800 Subject: [PATCH 6/6] PR feedback: fix translation key syntax --- features/bootstrap/MfaContext.php | 1 + .../material/themes/material/mfa/prompt-for-mfa-manager.twig | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/features/bootstrap/MfaContext.php b/features/bootstrap/MfaContext.php index 664b159..6ea146d 100644 --- a/features/bootstrap/MfaContext.php +++ b/features/bootstrap/MfaContext.php @@ -661,6 +661,7 @@ public function iShouldSeeAPromptForAManagerRescueCode() $pageHtml = $page->getHtml(); Assert::assertContains('Ask Your Recovery Contact for Help', $pageHtml); Assert::assertContains('Enter code', $pageHtml); + Assert::assertContains('m*****r@e******.c**', $pageHtml); } /** diff --git a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig index dfe3075..aa464f7 100644 --- a/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig +++ b/modules/material/themes/material/mfa/prompt-for-mfa-manager.twig @@ -29,7 +29,7 @@

- {{ '{mfa:manager_sent}'|trans({'{managerEmail': managerEmail}) }} + {{ '{mfa:manager_sent}'|trans({'%managerEmail%': managerEmail}) }}