From dcc821f3c612cdff59f33b460df91ea187973727 Mon Sep 17 00:00:00 2001 From: Michael van Schaik Date: Tue, 14 Mar 2017 06:10:27 +0100 Subject: [PATCH] Update UserFormRecipientItemRequest::preview to use theme-templates Fixes #556 --- code/model/recipients/UserFormRecipientItemRequest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/model/recipients/UserFormRecipientItemRequest.php b/code/model/recipients/UserFormRecipientItemRequest.php index 171efb4..cbd2341 100644 --- a/code/model/recipients/UserFormRecipientItemRequest.php +++ b/code/model/recipients/UserFormRecipientItemRequest.php @@ -20,6 +20,9 @@ class UserFormRecipientItemRequest extends GridFieldDetailForm_ItemRequest */ public function preview() { + // Enable theme for preview (may be needed for Shortcodes) + Config::inst()->update('SSViewer', 'theme_enabled', true); + return $this->customise(new ArrayData(array( 'Body' => $this->record->getEmailBodyContent(), 'HideFormData' => $this->record->HideFormData,