-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMailTemplate: Fix button background in Lotus Notes #10291
Conversation
…endering in lotus notes Signed-off-by: Julius Härtl <jus@bitgrid.net>
Okay, I will test this. |
That also means that any possible changed templates out there will not work anymore, because of the changed order of parameters. |
@juliushaertl Could you fix the unit tests as you changed the result HTML |
Ah so the custom templates only change the template strings :/ We should consider moving this to some template engine then, so we can have proper named parameters in the template string. (maybe something for 15) |
Or just use named replacements ;) But yes - something for 15 and we document it just and are done ;) |
Ok, let me fix the tests... |
lib/private/Mail/EMailTemplate.php
Outdated
@@ -539,7 +539,7 @@ public function addBodyButtonGroup(string $textLeft, | |||
$color = $this->themingDefaults->getColorPrimary(); | |||
$textColor = $this->themingDefaults->getTextColorPrimary(); | |||
|
|||
$this->htmlBody .= vsprintf($this->buttonGroup, [$color, $color, $urlLeft, $color, $textColor, $textColor, $textLeft, $urlRight, $textRight]); | |||
$this->htmlBody .= vsprintf($this->buttonGroup, [$color, $color, $color, $urlLeft, $color, $textColor, $textColor, $textLeft, $urlRight, $textRight]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can simply move the new value to the end and replace all %s
with their %1$s
equivalents.
That would keep compatibility
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
36b7f56
to
1213a7c
Compare
Thanks @nickvergessen for the hint 👍 Fixed that so we don't break compatibility. The failing test is unrelated. |
Changes from EMailTemplate.php are tested and working. |
I cannot test this, but according to #10052 and https://www.campaignmonitor.com/css/email-client/ibm-notes-9/ it should work. 🙈
@michag86 Can you maybe test this and prove that it works?