You are here

function _subscriptions_mail_preview in Subscriptions 2.0.x

Same name and namespace in other branches
  1. 7 subscriptions_mail.mail_edit.inc \_subscriptions_mail_preview()

Submit handler for the 'Preview template' button.

Parameters

$form array:

$form_state array:

1 call to _subscriptions_mail_preview()
subscriptions_mail_preview in subscriptions_mail/subscriptions_mail.module
Submit handler for the 'Preview template' button.

File

subscriptions_mail/subscriptions_mail.mail_edit.inc, line 210
Subscriptions_mail module integration with Mail Editor module.

Code

function _subscriptions_mail_preview(array $form, array &$form_state) {
  $values = $form_state['values'];
  if (isset($values['preview_mode'])) {
    variable_set('subscriptions_preview_mode', $values['preview_mode']);
  }
  $form_state['template_preview'] = _subscriptions_mail_preview_form($values);
  $form_state['rebuild'] = TRUE;
}