From 1efeeca6db4a78aace523bee10e6220e01638fc1 Mon Sep 17 00:00:00 2001 From: Luke Amos Date: Thu, 17 Jan 2019 10:30:05 +1300 Subject: [PATCH] FIX Fixes #814 Renamed 'SubmittedFormEmailHtml' to 'SubmittedFormEmail' following peer feedback. Updated respective code and unit test --- code/Control/UserDefinedFormController.php | 2 +- .../{SubmittedFormEmailHtml.ss => SubmittedFormEmail.ss} | 0 tests/Model/UserDefinedFormTest.php | 4 ++-- 3 files changed, 3 insertions(+), 3 deletions(-) rename templates/email/{SubmittedFormEmailHtml.ss => SubmittedFormEmail.ss} (100%) mode change 100755 => 100644 diff --git a/code/Control/UserDefinedFormController.php b/code/Control/UserDefinedFormController.php index 1f9fb78..02c93bf 100644 --- a/code/Control/UserDefinedFormController.php +++ b/code/Control/UserDefinedFormController.php @@ -290,7 +290,7 @@ JS if ($recipients = $this->FilteredEmailRecipients($data, $form)) { foreach ($recipients as $recipient) { $email = Email::create() - ->setHTMLTemplate('email/SubmittedFormEmailHtml') + ->setHTMLTemplate('email/SubmittedFormEmail') ->setPlainTemplate('email/SubmittedFormEmailPlain'); // Merge fields are used for CMS authors to reference specific form fields in email content diff --git a/templates/email/SubmittedFormEmailHtml.ss b/templates/email/SubmittedFormEmail.ss old mode 100755 new mode 100644 similarity index 100% rename from templates/email/SubmittedFormEmailHtml.ss rename to templates/email/SubmittedFormEmail.ss diff --git a/tests/Model/UserDefinedFormTest.php b/tests/Model/UserDefinedFormTest.php index a8e8d71..ef6a638 100644 --- a/tests/Model/UserDefinedFormTest.php +++ b/tests/Model/UserDefinedFormTest.php @@ -175,8 +175,8 @@ class UserDefinedFormTest extends FunctionalTest $result = $recipient->getEmailTemplateDropdownValues(); // Installation path can be as a project when testing in Travis, so check partial match - $this->assertContains('email' . DIRECTORY_SEPARATOR . 'SubmittedFormEmailHtml', key($result)); - $this->assertSame('SubmittedFormEmailHtml', current($result)); + $this->assertContains('email' . DIRECTORY_SEPARATOR . 'SubmittedFormEmail', key($result)); + $this->assertSame('SubmittedFormEmail', current($result)); } public function testEmailTemplateExists()