diff --git a/booking.admin.inc b/booking.admin.inc index d6860bf..3530ac4 100644 --- a/booking.admin.inc +++ b/booking.admin.inc @@ -75,7 +75,14 @@ function booking_admin() { t('Yes') ), '#default_value' => variable_get('booking_enable_html_mail', 0), - ); + ); + $form['emails']['booking_html_mail_footer'] = array( + '#title' => t('Footer text for HTML email'), + '#description' => t('Enter HTML to go in the footer of the email template (above the social media icons).'), + '#default_value' => isset(variable_get('booking_html_mail_footer')['value']) ? variable_get('booking_html_mail_footer')['value'] : variable_get('booking_html_mail_footer', '
'), + '#type' => 'text_format', + '#format' => 'full_html', + ); $form['email']['booking_custom_email_count'] = array( '#type' => 'textfield', '#title' => t('Number of custom email definitions'), diff --git a/booking.module b/booking.module index ac7e333..5026bc8 100644 --- a/booking.module +++ b/booking.module @@ -855,6 +855,10 @@ function booking_theme($existing, $type, $theme, $path) { // if our more heavily customised template exists, use that, otherwise fall back to the generic one $template_file = is_file($theme_path . '/mimemail-message-registration_mail.tpl.php') ? '/mimemail-message-registration_mail' : '/mimemail-message'; + //get the footer text + $message_footer = variable_get('booking_html_mail_footer'); + $message_footer = isset($message_footer['format']) ? $message_footer['value'] : $message_footer; + return array( 'booking_details' => array('arguments' => array('node' => NULL)), 'booking_htmlmail_template' => array( @@ -863,7 +867,7 @@ function booking_theme($existing, $type, $theme, $path) { 'template' => 'mimemail-message' // extension of .tpl.php automatically added ), 'booking_htmlmail_registration_mail' => array( - 'variables' => array('subject' => NULL, 'body' => NULL), + 'variables' => array('subject' => NULL, 'body' => NULL, 'footer' => $message_footer), 'path' => $theme_path, 'image_path' => drupal_get_path('module', 'booking'). '/images', 'template' => $template_file, diff --git a/theme/mimemail-message-registration_mail.tpl.php b/theme/mimemail-message-registration_mail.tpl.php index 739ec98..b16a138 100644 --- a/theme/mimemail-message-registration_mail.tpl.php +++ b/theme/mimemail-message-registration_mail.tpl.php @@ -296,7 +296,14 @@ a[x-apple-data-detectors=true] {
Our preferred method of contact is via email.
info@studyweek.net
If you have an enquiry regarding your booking.
bookings@studyweek.net
Need to speak to the right person?
Speak to our bookings coordinator - 0423 637 024