Work on bed allocations

This commit is contained in:
2014-05-27 10:28:28 +10:00
parent 4c75894786
commit 773ba5a101
6 changed files with 255 additions and 147 deletions

View File

@@ -68,7 +68,7 @@ function _get_tshirt_options() {
/**
* Helper function to look up description of studygroup role
* @param $input integer containing role id
* @return string for corresponding room location
* @return string for corresponding role
*/
function _booking_studygroup_role_lookup($input = NULL)
{
@@ -108,6 +108,25 @@ function _booking_room_location_lookup($input = NULL)
return $location;
}
/**
* Helper function to look up description of bed type
* @param $input integer containing bed type id
* @return string for corresponding bed type
*/
function _booking_room_bedtype_lookup($input = NULL)
{
$bed = array();
$bed[] = '';
$bed[] = t('Single');
$bed[] = t('Double');
$bed[] = t('Queen');
if ($input != NULL)
return $bed[$input];
else
return $role;
}
/**
* Helper function to reliably (without using any external APIs) provide a list of options for the country field used in the registration form
*/