From 683ee14428b70358b327dbbd1002463c31008232 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 21 Jun 2017 15:42:18 +1200 Subject: [PATCH] FIX Preview recipient email link for SS 3.6 --- code/model/recipients/UserDefinedForm_EmailRecipient.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/model/recipients/UserDefinedForm_EmailRecipient.php b/code/model/recipients/UserDefinedForm_EmailRecipient.php index 79110f3..1636492 100644 --- a/code/model/recipients/UserDefinedForm_EmailRecipient.php +++ b/code/model/recipients/UserDefinedForm_EmailRecipient.php @@ -221,14 +221,17 @@ class UserDefinedForm_EmailRecipient extends DataObject 'The email address which the recipient is able to \'reply\' to.' )) )); - + $fields->fieldByName('Root.EmailDetails')->setTitle(_t('UserDefinedForm_EmailRecipient.EMAILDETAILSTAB', 'Email Details')); // Only show the preview link if the recipient has been saved. if (!empty($this->EmailTemplate)) { $preview = sprintf( '

%s

%s', - "admin/pages/edit/EditForm/field/EmailRecipients/item/{$this->ID}/preview", + Controller::join_links( + singleton('CMSPageEditController')->getEditForm()->FormAction(), + "field/EmailRecipients/item/{$this->ID}/preview" + ), _t('UserDefinedForm.PREVIEW_EMAIL', 'Preview email'), _t('UserDefinedForm.PREVIEW_EMAIL_DESCRIPTION', 'Note: Unsaved changes will not appear in the preview.') );