more work on email preview
This commit is contained in:
@@ -382,7 +382,7 @@ function booking_manual_email_form($form, &$form_state)
|
||||
|
||||
$form['booking-email-preview'] = array(
|
||||
'#type' => 'container',
|
||||
'#children' => "<p>Preview Email</p><pre>Blah</pre>",
|
||||
'#children' => "<p>Email Preview</p><pre>Blah</pre>",
|
||||
'#prefix' => '<div id="booking_email_preview_wrapper">',
|
||||
'#suffix' => '</div>',
|
||||
);
|
||||
@@ -485,7 +485,7 @@ function booking_manual_email_form($form, &$form_state)
|
||||
*/
|
||||
function _booking_email_get_preview_callback($form, $form_state) {
|
||||
global $event;
|
||||
$markup_pre = "<div id=\"booking_email_preview_wrapper\"><pre>";
|
||||
$markup_pre = "<div id=\"booking_email_preview_wrapper\"><h3>Email Preview</h3><pre>";
|
||||
$markup_post = "</pre></div>";
|
||||
$text = "";
|
||||
$emailtype = $form_state['values']['email-type'];
|
||||
@@ -494,6 +494,28 @@ function _booking_email_get_preview_callback($form, $form_state) {
|
||||
case "registration":
|
||||
$text = variable_get('booking_email_bookedin_text');
|
||||
break;
|
||||
case "balance":
|
||||
$text = variable_get('booking_email_paymentoutstanding_text');
|
||||
break;
|
||||
case "complete":
|
||||
$text = variable_get('booking_email_regn_complete_text');
|
||||
break;
|
||||
case "withdrawal":
|
||||
$text = variable_get('booking_email_notcoming_demotion');
|
||||
break;
|
||||
case "missedpayment":
|
||||
$text = variable_get('booking_email_missedpayment');
|
||||
break;
|
||||
case "initialtravelrequired":
|
||||
$text = variable_get('booking_email_travel_initial_email_text');
|
||||
break;
|
||||
case "remindertravelrequired":
|
||||
$text = variable_get('booking_email_travel_reminder_email_text');
|
||||
break;
|
||||
}
|
||||
//handle custom email types
|
||||
if (strpos($emailtype, 'custom') !== false) {
|
||||
$text = variable_get('booking_email_' . $form_state['values']['email-type']);
|
||||
}
|
||||
/*
|
||||
if ($form_state['values']['email-type'] == 'registration') {
|
||||
|
Reference in New Issue
Block a user