increase flexibility in form
This commit is contained in:
@@ -49,15 +49,12 @@ function booking_emails_admin() {
|
||||
$booking_email_paymentoutstanding_married_text = "";
|
||||
|
||||
if(variable_get('booking_enable_html_mail', 0) == 1) {
|
||||
$textarea_defaults = array(
|
||||
'#type' => 'text_format',
|
||||
'#format' => 'full_html',
|
||||
);
|
||||
$form_type = 'text_format';
|
||||
$form_format = 'full_html';
|
||||
}
|
||||
else {
|
||||
$textarea_defaults = array(
|
||||
'#type' => 'textarea',
|
||||
);
|
||||
$form_type = 'textarea';
|
||||
$form_format = NULL;
|
||||
}
|
||||
|
||||
//include the token definitions
|
||||
@@ -83,11 +80,10 @@ function booking_emails_admin() {
|
||||
$form['emails']['booking_email_bookedin_text'] = array(
|
||||
'#title' => t('Registration Successful Email'),
|
||||
'#description' => t('Text to use in an email indicating the person has booked in, paid their deposit and is not on the waiting list'),
|
||||
'#default_value' => variable_get('booking_email_bookedin_text')['value'],
|
||||
'#type' => 'text_format',
|
||||
'#format' => 'full_html',
|
||||
'#default_value' => $form_type == 'text_format' ? variable_get('booking_email_bookedin_text')['value'] : variable_get('booking_email_bookedin_text'),
|
||||
'#type' => $form_type,
|
||||
'#format' => $form_format,
|
||||
);
|
||||
//$form['emails']['booking_email_bookedin_text'] += $textarea_defaults;
|
||||
$form['emails']['booking_email_regn_complete_text'] = array(
|
||||
'#title' => t('Payment Complete Email'),
|
||||
'#type' => 'textarea',
|
||||
|
Reference in New Issue
Block a user