From 775124af5f3bc7704e7f2edb0d4dd5b4ee58045e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Tue, 15 Jul 2025 20:42:26 +0200 Subject: [PATCH] fix: Fix button alignment for email templates in Outlook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The button group generated in email templates is expected to show the two buttons side by side in a single row, but in Outlook both buttons took the full width of the wrapper row and each button was shown in its own row. To solve that the buttons are wrapped in an additional table that shows each button in its own cell, limiting their width and showing them in a single row; this is done conditionally and only applied in Outlook, so it should not affect other clients. Signed-off-by: Daniel Calviño Sánchez --- .../tests/Mailer/NewUserMailHelperTest.php | 126 ++++++++++++------ lib/private/Mail/EMailTemplate.php | 42 ++++-- .../data/emails/new-account-email-custom.html | 42 ++++-- tests/data/emails/new-account-email.html | 42 ++++-- 4 files changed, 168 insertions(+), 84 deletions(-) diff --git a/apps/settings/tests/Mailer/NewUserMailHelperTest.php b/apps/settings/tests/Mailer/NewUserMailHelperTest.php index ccda4611fbd..fc9f014cad1 100644 --- a/apps/settings/tests/Mailer/NewUserMailHelperTest.php +++ b/apps/settings/tests/Mailer/NewUserMailHelperTest.php @@ -260,32 +260,46 @@ class NewUserMailHelperTest extends TestCase {
- - - @@ -496,32 +510,46 @@ EOF;
- + +
-
- Set your password + + + + + +
+ Set your password +
+ + -
- Install Client + + + + + +
+ Install Client +
+
- - - @@ -721,32 +749,46 @@ EOF;
- + +
-
- Go to TestCloud + + + + + +
+ Go to TestCloud +
+ + -
- Install Client + + + + + +
+ Install Client +
+
- - - diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index 2cb222fd137..2df78816a8f 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -190,32 +190,46 @@ EOF;
- + +
-
- Go to TestCloud + + + + + +
+ Go to TestCloud +
+ + -
- Install Client + + + + + +
+ Install Client +
+
- - - diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html index 990c4dc48e8..6c0986a44a8 100644 --- a/tests/data/emails/new-account-email-custom.html +++ b/tests/data/emails/new-account-email-custom.html @@ -107,32 +107,46 @@
- + +
-
- %7\$s + + + + + +
+ %7\$s +
+ + -
- %9\$s + + + + + +
+ %9\$s +
+
- - - diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html index db95a533337..bc9cda6fd9c 100644 --- a/tests/data/emails/new-account-email.html +++ b/tests/data/emails/new-account-email.html @@ -107,32 +107,46 @@
- + +
-
- Set your password + + + + + +
+ Set your password +
+ + -
- Install Client + + + + + +
+ Install Client +
+
- - -
- + +
-
- Set your password + + + + + +
+ Set your password +
+ + -
- Install Client + + + + + +
+ Install Client +
+