cleanup
This commit is contained in:
@@ -279,7 +279,6 @@ function booking_emails_custom_ajax_form($node, &$form_state) {
|
|||||||
if (!isset($form_state['input']['email-type'])) {
|
if (!isset($form_state['input']['email-type'])) {
|
||||||
$subject_value = "";
|
$subject_value = "";
|
||||||
$body_value = "";
|
$body_value = "";
|
||||||
$submit_button_disabled = TRUE;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
watchdog('booking_debug', 'booking_emails_custom_ajax_form user has selected email type ' . $form_state['input']['email-type']);
|
watchdog('booking_debug', 'booking_emails_custom_ajax_form user has selected email type ' . $form_state['input']['email-type']);
|
||||||
@@ -293,6 +292,7 @@ function booking_emails_custom_ajax_form($node, &$form_state) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Define the textareas in the form differently if HTML emails are enabled
|
||||||
if(variable_get('booking_enable_html_mail', 0) == 1) {
|
if(variable_get('booking_enable_html_mail', 0) == 1) {
|
||||||
$form_type = 'text_format';
|
$form_type = 'text_format';
|
||||||
$form_format = 'full_html';
|
$form_format = 'full_html';
|
||||||
@@ -380,11 +380,13 @@ function booking_emails_custom_ajax_form_callback($form, &$form_state) {
|
|||||||
//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)));
|
||||||
// TODO : Figure out what this should be if HTML emails are NOT enabled
|
// TODO : Figure out what this should be if HTML emails are NOT enabled
|
||||||
$form['form']['email-definition']['booking_email_body_custom']['value']['#value'] = $text;
|
$form['form']['email-definition']['booking_email_body_custom']['value']['#value'] = $text;
|
||||||
|
// TODO : Does changing submit button state here do anything?
|
||||||
$form['form']['submit']['#disabled'] = FALSE;
|
$form['form']['submit']['#disabled'] = FALSE;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$form['form']['email-definition']['booking_email_subjectline_custom']['#value'] = '';
|
$form['form']['email-definition']['booking_email_subjectline_custom']['#value'] = '';
|
||||||
$form['form']['email-definition']['booking_email_body_custom']['value']['#value'] = '';
|
$form['form']['email-definition']['booking_email_body_custom']['value']['#value'] = '';
|
||||||
|
// TODO : Does changing submit button state here do anything?
|
||||||
$form['form']['submit']['#disabled'] = TRUE;
|
$form['form']['submit']['#disabled'] = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user