diff --git a/booking.admin.inc b/booking.admin.inc index afe1ab8..75e6ce6 100644 --- a/booking.admin.inc +++ b/booking.admin.inc @@ -208,7 +208,9 @@ function booking_admin() { '#type' => 'textfield', '#title' => t('Dietary Requirements 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 ( '#type' => 'radios', diff --git a/booking.module b/booking.module index 7f3c203..5a98885 100644 --- a/booking.module +++ b/booking.module @@ -391,31 +391,33 @@ function booking_menu() { } //configure rooms - $items['admin/booking/rooms'] = array( - 'title' => 'View Room Locations', - 'description' => 'View Room Locations', - 'page callback' => 'booking_room_view_summary', - 'access arguments' => array("view room allocations"), - 'type' => MENU_NORMAL_ITEM, - ); - + if (variable_get('booking_enable_roomallocations', 0) == 1) + { + $items['admin/booking/rooms'] = array( + 'title' => 'View Room Locations', + 'description' => 'View Room Locations', + 'page callback' => 'booking_room_view_summary', + 'access arguments' => array("view room allocations"), + 'type' => MENU_NORMAL_ITEM, + ); - $items['admin/booking/rooms/%/assign'] = array( - 'title' => 'Assign Rooms', - 'description' => 'Assign attendees to rooms', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('booking_rooms_allocate_form', 3), - 'access arguments' => array('edit room allocations'), - //'type' => MENU_NORMAL_ITEM, - ); + $items['admin/booking/rooms/%/assign'] = array( + 'title' => 'Assign Rooms', + 'description' => 'Assign attendees to rooms', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('booking_rooms_allocate_form', 3), + 'access arguments' => array('edit room allocations'), + //'type' => MENU_NORMAL_ITEM, + ); - $items['admin/booking/rooms/%/view'] = array( - 'title' => 'View Allocated Rooms', - 'description' => 'Assign attendees to rooms', - 'page callback' => 'drupal_get_form', - 'page arguments' => array('booking_rooms_view_form', 3), - 'access arguments' => array('view room allocations'), - ); + $items['admin/booking/rooms/%/view'] = array( + 'title' => 'View Allocated Rooms', + 'description' => 'Assign attendees to rooms', + 'page callback' => 'drupal_get_form', + 'page arguments' => array('booking_rooms_view_form', 3), + 'access arguments' => array('view room allocations'), + ); + } //Configure prices $items['admin/config/booking/prices/create'] = array( diff --git a/booking.rooms.inc b/booking.rooms.inc index f75f970..4864848 100644 --- a/booking.rooms.inc +++ b/booking.rooms.inc @@ -13,7 +13,7 @@ function booking_room_view_summary() { global $event; $output = ""; $header = array('Location', 'Assign Attendees', 'View Rooms For Location'); - $attributes = array('style' => 'max-width:30%'); + $attributes = array('style' => 'max-width:45%'); $rows = array(); //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 booking_rooms_define_form($node, &$form_state, $location_id) { +function booking_rooms_define_form($node, &$form_state) { global $event; $form = array(); $bedcount_options = array();