This commit is contained in:
Nathan Coad
2018-05-22 10:36:38 +10:00
parent 9e20d49304
commit c5179b059e

View File

@@ -305,12 +305,12 @@ function booking_emails_custom_ajax_form($node, &$form_state) {
'#title' => t('Subject line for Custom Email'), '#title' => t('Subject line for Custom Email'),
'#size' => 150, '#size' => 150,
'#maxlength' => 300, '#maxlength' => 300,
'#value' => isset($form_state['values']['booking_email_subjectline_custom']) ? $form_state['values']['booking_email_subjectline_custom'] : '', //'#value' => isset($form_state['values']['booking_email_subjectline_custom']) ? $form_state['values']['booking_email_subjectline_custom'] : '',
); );
$form['email-definition']['booking_email_body_custom'] = array( $form['email-definition']['booking_email_body_custom'] = array(
'#title' => t('Email text for custom email'), '#title' => t('Email text for custom email'),
'#description' => t(''), '#description' => t(''),
'#value' => isset($form_state['values']['booking_email_body_custom']) ? $form_state['values']['booking_email_body_custom'] : '', //'#value' => isset($form_state['values']['booking_email_body_custom']) ? $form_state['values']['booking_email_body_custom'] : '',
'#type' => $form_type, '#type' => $form_type,
'#format' => $form_format, '#format' => $form_format,
); );
@@ -343,7 +343,7 @@ function booking_emails_custom_ajax_form_callback($form, &$form_state) {
$text = variable_get('booking_email_' . $emailtype, ''); $text = variable_get('booking_email_' . $emailtype, '');
$text = isset($text['format']) ? $text['value'] : $text; $text = isset($text['format']) ? $text['value'] : $text;
watchdog('booking_debug', 'custom text: <pre>@info</pre>', array('@info' => print_r( $text, true))); watchdog('booking_debug', 'custom text: <pre>@info</pre>', array('@info' => print_r( $text, true)));
$form['form']['email-definition']['booking_email_body_custom']['#value'] = $text; $form['form']['email-definition']['booking_email_body_custom']['#default_value'] = $text;
} }
watchdog('booking_debug', 'booking_emails_custom_ajax_form_callback: <pre>@info</pre>', array('@info' => print_r( $form, true))); watchdog('booking_debug', 'booking_emails_custom_ajax_form_callback: <pre>@info</pre>', array('@info' => print_r( $form, true)));