From 050ce1d40bf344510338a401ce6b68f76ed3f5e5 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Tue, 11 Apr 2017 16:13:34 -0500 Subject: Add addBodyButton to add a single button to email templates Signed-off-by: Morris Jobke --- .../emails/new-account-email-single-button.html | 174 +++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 tests/data/emails/new-account-email-single-button.html (limited to 'tests/data/emails/new-account-email-single-button.html') diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html new file mode 100644 index 00000000000..c204bedb234 --- /dev/null +++ b/tests/data/emails/new-account-email-single-button.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + +
+
+ + + +
+ + + + + + +
+ + + +
+ +
+ + +
+
+
+ + + + + + +
 
+ + + + + +
+

Welcome aboard

+
+ + + + + + +
 
+ + + +
+ + + + + + +
+ + + + + + +
 
+ + + + + +
+ + + + + +
+

You have now an Nextcloud account, you can add, protect, and share your data.

+
+
+ + + + + +
+ + + + + +
+

Your username is: abc

+
+
+ + + + + +
 
+ + + + + + +
+ + + + + +
+
+ + + + +
+ + + + +
+ Set your password +
+
+
+
+
+
+
+ + + + + +
 
+ + + + +
+
+ +
                                                           
+ + \ No newline at end of file -- cgit v1.2.3 From 1c8c62272c6862405c435e015c107b1767e43b9b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 12 Apr 2017 11:52:58 +0200 Subject: Use instance name as alt-text Signed-off-by: Joas Schilling --- lib/private/Mail/EMailTemplate.php | 4 ++-- tests/data/emails/new-account-email-custom.html | 2 +- tests/data/emails/new-account-email-single-button.html | 2 +- tests/data/emails/new-account-email.html | 2 +- tests/lib/Mail/EMailTemplateTest.php | 4 ++++ 5 files changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/data/emails/new-account-email-single-button.html') diff --git a/lib/private/Mail/EMailTemplate.php b/lib/private/Mail/EMailTemplate.php index f82ddc689eb..dd5cf605c99 100644 --- a/lib/private/Mail/EMailTemplate.php +++ b/lib/private/Mail/EMailTemplate.php @@ -98,7 +98,7 @@ EOF;
- +
@@ -328,7 +328,7 @@ EOF; $this->headerAdded = true; $logoUrl = $this->urlGenerator->getAbsoluteURL($this->themingDefaults->getLogo()); - $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getColorPrimary(), $logoUrl]); + $this->htmlBody .= vsprintf($this->header, [$this->themingDefaults->getColorPrimary(), $logoUrl, $this->themingDefaults->getName()]); } /** diff --git a/tests/data/emails/new-account-email-custom.html b/tests/data/emails/new-account-email-custom.html index c754412e681..a60902ae306 100644 --- a/tests/data/emails/new-account-email-custom.html +++ b/tests/data/emails/new-account-email-custom.html @@ -23,7 +23,7 @@
- +
diff --git a/tests/data/emails/new-account-email-single-button.html b/tests/data/emails/new-account-email-single-button.html index c204bedb234..50763efa5b5 100644 --- a/tests/data/emails/new-account-email-single-button.html +++ b/tests/data/emails/new-account-email-single-button.html @@ -23,7 +23,7 @@
- +
diff --git a/tests/data/emails/new-account-email.html b/tests/data/emails/new-account-email.html index 4fb6f5af15e..2e3866163d7 100644 --- a/tests/data/emails/new-account-email.html +++ b/tests/data/emails/new-account-email.html @@ -23,7 +23,7 @@
- +
diff --git a/tests/lib/Mail/EMailTemplateTest.php b/tests/lib/Mail/EMailTemplateTest.php index 664da6c17e5..f9e1ecf29ca 100644 --- a/tests/lib/Mail/EMailTemplateTest.php +++ b/tests/lib/Mail/EMailTemplateTest.php @@ -62,6 +62,10 @@ class EMailTemplateTest extends TestCase { ->expects($this->any()) ->method('getLogo') ->willReturn('/img/logo-mail-header.png'); + $this->defaults + ->expects($this->any()) + ->method('getName') + ->willReturn('TestCloud'); $this->urlGenerator ->expects($this->once()) ->method('getAbsoluteURL') -- cgit v1.2.3