logic fix

This commit is contained in:
2017-06-29 11:40:48 +10:00
parent d1dc168197
commit b0cc61de6c
2 changed files with 14 additions and 15 deletions

View File

@@ -25,18 +25,7 @@ function booking_admin() {
'#type' => 'fieldset',
'#title' => 'Email Addresses',
'#collapsible' => TRUE,
);
$form['email']['booking_enable_html_mail'] = array(
'#type' => 'radios',
'#title' => t('Enable html emails?'),
'#description' => t('Turn this feature on for html based emails, otherwise plaintext emails will be used. HTML based emails will require a custom template file to be defined.<br /><strong>WARNING: This will reset all existing mail definitions.</strong> Take care before changing this value.'),
'#options' => array(
0 => t('No'),
t('Yes')
),
'#default_value' => variable_get('booking_enable_html_mail', 0)
);
);
$form['email']['booking_from_email'] = array(
'#type' => 'textfield',
@@ -65,7 +54,7 @@ function booking_admin() {
'#size' => 60,
'#maxlength' => 150,
'#required' => TRUE,
'#default_value' => variable_get('booking_contact_email', variable_get('site_mail', ini_get('sendmail_from')))
'#default_value' => variable_get('booking_contact_email', variable_get('site_mail', ini_get('sendmail_from'))),
);
$form['email']['booking_logistics_email'] = array(
@@ -75,8 +64,18 @@ function booking_admin() {
'#size' => 60,
'#maxlength' => 150,
'#required' => TRUE,
'#default_value' => variable_get('booking_logistics_email', variable_get('site_mail', ini_get('sendmail_from')))
'#default_value' => variable_get('booking_logistics_email', variable_get('site_mail', ini_get('sendmail_from'))),
);
$form['email']['booking_enable_html_mail'] = array(
'#type' => 'radios',
'#title' => t('Enable html emails?'),
'#description' => t('Turn this feature on for html based emails, otherwise plaintext emails will be used. HTML based emails will require a custom template file to be defined.<br /><strong>WARNING: This will reset all existing mail definitions.</strong> Take care before changing this value.'),
'#options' => array(
0 => t('No'),
t('Yes')
),
'#default_value' => variable_get('booking_enable_html_mail', 0),
);
$form['email']['booking_custom_email_count'] = array(
'#type' => 'textfield',
'#title' => t('Number of custom email definitions'),

View File

@@ -38,7 +38,7 @@ function booking_register_page()
);
//even if we are allowed to show the early access code, only show it if it is prior to the normal registration opening time
$return_array[] = array(
'form' => drupal_get_form('booking_form', true, ($booking_times->booking_register_open < time()))
'form' => drupal_get_form('booking_form', true, ($booking_times->booking_register_open > time()))
);
} elseif ($booking_times->booking_register_close < time()) {
//too late to register