function registration_waitlist_registration_entity_settings in Entity Registration 8
Same name and namespace in other branches
- 8.2 modules/registration_waitlist/registration_waitlist.module \registration_waitlist_registration_entity_settings()
- 7.2 modules/registration_waitlist/registration_waitlist.module \registration_waitlist_registration_entity_settings()
- 7 modules/registration_waitlist/registration_waitlist.module \registration_waitlist_registration_entity_settings()
Implements hook_registration_entity_settings().
File
- modules/
registration_waitlist/ registration_waitlist.module, line 13 - Entity Registration waitlist functionality
Code
function registration_waitlist_registration_entity_settings($settings) {
// add a settings element to enable adding registrations to the waitlist
return array(
'registration_waitlist_enable' => array(
'#type' => 'checkbox',
'#title' => t('Enable wait list'),
'#description' => t('When wait list is enabled, registrations made after capacity has been reached will be set to the wait list state.'),
'#default_value' => isset($settings['settings']['registration_waitlist_enable']) ? $settings['settings']['registration_waitlist_enable'] : 0,
),
'registration_waitlist_capacity' => array(
'#type' => 'textfield',
'#title' => t('Wait list capacity'),
'#size' => 5,
'#maxsize' => 10,
'#required' => TRUE,
'#description' => t('The maximum number of registrants on the wait list. Leave at 0 for no limit.'),
'#default_value' => isset($settings['settings']['registration_waitlist_capacity']) ? $settings['settings']['registration_waitlist_capacity'] : 0,
'#states' => array(
'visible' => array(
':input[name="settings[registration_waitlist_enable]"]' => array(
'checked' => TRUE,
),
),
),
),
);
}