mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Adding back previous value for SSViewer::theme_enabled
This commit is contained in:
parent
dcc821f3c6
commit
091997027b
@ -21,13 +21,19 @@ class UserFormRecipientItemRequest extends GridFieldDetailForm_ItemRequest
|
||||
public function preview()
|
||||
{
|
||||
// Enable theme for preview (may be needed for Shortcodes)
|
||||
$previous_theme_enabled = Config::inst()->get('SSViewer', 'theme_enabled');
|
||||
Config::inst()->update('SSViewer', 'theme_enabled', true);
|
||||
|
||||
return $this->customise(new ArrayData(array(
|
||||
$ret = $this->customise(new ArrayData(array(
|
||||
'Body' => $this->record->getEmailBodyContent(),
|
||||
'HideFormData' => $this->record->HideFormData,
|
||||
'Fields' => $this->getPreviewFieldData()
|
||||
)))->renderWith($this->record->EmailTemplate);
|
||||
|
||||
// reset theme preview value
|
||||
Config::inst()->update('SSViewer', 'theme_enabled', $previous_theme_enabled);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user