Something

This commit is contained in:
2014-05-28 16:58:28 +10:00
parent 6e1c8633dc
commit 91448255c7
3 changed files with 30 additions and 26 deletions

View File

@@ -208,7 +208,9 @@ function booking_admin() {
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Dietary Requirements Text Definition'), '#title' => t('Dietary Requirements Text Definition'),
'#default_value' => variable_get('booking_dietary_text_definition', ''), '#default_value' => variable_get('booking_dietary_text_definition', ''),
'#description' => 'Text to use if attendee may not specify dietary requirements (as above).', '#description' => 'Text to use on registration form if attendee may not specify dietary requirements (as above).',
'#size' => 150,
'#maxlength' => 2000,
); );
$form['misc']['booking_enable_roomallocations'] = array ( $form['misc']['booking_enable_roomallocations'] = array (
'#type' => 'radios', '#type' => 'radios',

View File

@@ -391,31 +391,33 @@ function booking_menu() {
} }
//configure rooms //configure rooms
$items['admin/booking/rooms'] = array( if (variable_get('booking_enable_roomallocations', 0) == 1)
'title' => 'View Room Locations', {
'description' => 'View Room Locations', $items['admin/booking/rooms'] = array(
'page callback' => 'booking_room_view_summary', 'title' => 'View Room Locations',
'access arguments' => array("view room allocations"), 'description' => 'View Room Locations',
'type' => MENU_NORMAL_ITEM, 'page callback' => 'booking_room_view_summary',
); 'access arguments' => array("view room allocations"),
'type' => MENU_NORMAL_ITEM,
);
$items['admin/booking/rooms/%/assign'] = array( $items['admin/booking/rooms/%/assign'] = array(
'title' => 'Assign Rooms', 'title' => 'Assign Rooms',
'description' => 'Assign attendees to rooms', 'description' => 'Assign attendees to rooms',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('booking_rooms_allocate_form', 3), 'page arguments' => array('booking_rooms_allocate_form', 3),
'access arguments' => array('edit room allocations'), 'access arguments' => array('edit room allocations'),
//'type' => MENU_NORMAL_ITEM, //'type' => MENU_NORMAL_ITEM,
); );
$items['admin/booking/rooms/%/view'] = array( $items['admin/booking/rooms/%/view'] = array(
'title' => 'View Allocated Rooms', 'title' => 'View Allocated Rooms',
'description' => 'Assign attendees to rooms', 'description' => 'Assign attendees to rooms',
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('booking_rooms_view_form', 3), 'page arguments' => array('booking_rooms_view_form', 3),
'access arguments' => array('view room allocations'), 'access arguments' => array('view room allocations'),
); );
}
//Configure prices //Configure prices
$items['admin/config/booking/prices/create'] = array( $items['admin/config/booking/prices/create'] = array(

View File

@@ -13,7 +13,7 @@ function booking_room_view_summary() {
global $event; global $event;
$output = ""; $output = "";
$header = array('Location', 'Assign Attendees', 'View Rooms For Location'); $header = array('Location', 'Assign Attendees', 'View Rooms For Location');
$attributes = array('style' => 'max-width:30%'); $attributes = array('style' => 'max-width:45%');
$rows = array(); $rows = array();
//get room definitions //get room definitions
@@ -43,7 +43,7 @@ function booking_room_view_summary() {
/** /**
* Function to define the form for configuring room definitions and also display existing room definitions * Function to define the form for configuring room definitions and also display existing room definitions
*/ */
function booking_rooms_define_form($node, &$form_state, $location_id) { function booking_rooms_define_form($node, &$form_state) {
global $event; global $event;
$form = array(); $form = array();
$bedcount_options = array(); $bedcount_options = array();