From 1501d6bd63410872340ed6b7cc3732906759751b Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 22 May 2018 12:18:37 +1000 Subject: [PATCH] use form state input instead --- booking.emails_admin.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/booking.emails_admin.inc b/booking.emails_admin.inc index 1e1d337..d678dbb 100644 --- a/booking.emails_admin.inc +++ b/booking.emails_admin.inc @@ -275,15 +275,17 @@ function booking_emails_custom_ajax_form($node, &$form_state) { // Populate some default values if a selection has already been made watchdog('booking_debug', 'booking_emails_custom_ajax_form state:
@info
', array('@info' => print_r( $form_state, true))); - if (!isset($form_state['storage']['emailtype'])) { + if (!isset($form_state['input']['email-type'])) { $subject_value = ""; $body_value = ""; } else { - $emailtype = $form_state['storage']['emailtype']; - $subject_value = variable_get('booking_email_subject_' . $emailtype, ''); - $body_value = variable_get('booking_email_' . $emailtype, ''); - $body_value = isset($body_value['format']) ? $body_value['value'] : $body_value; + $emailtype = $form_state['input']['email-type']; + $subject_value = $form_state['input']['booking_email_subjectline_custom']; + $body_value = $form_state['input']['booking_email_body_custom']; + //$subject_value = variable_get('booking_email_subject_' . $emailtype, ''); + //$body_value = variable_get('booking_email_' . $emailtype, ''); + //$body_value = isset($body_value['format']) ? $body_value['value'] : $body_value; } if(variable_get('booking_enable_html_mail', 0) == 1) {