Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_field_entry_areas($disabled=FALSE)
- {
- global $areas, $area_id, $rooms;
- // if there is more than one area then give the option
- // to choose areas.
- if (count($areas) > 0)
- {
- // We will set the display to none and then turn it on in the JavaScript. That's
- // because if there's no JavaScript we don't want to display it because we won't
- // have any means of changing the rooms if the area is changed.
- echo "<div id=\"div_areas\" style=\"display: none\">\n";
- $options = array();
- // go through the areas and create the options
- foreach ($areas as $a)
- {
- $options[$a['id']] = $a['area_name'];
- }
- $params = array('label' => get_vocab("area") . ":",
- 'name' => 'area',
- 'options' => $options,
- 'force_assoc' => TRUE,
- 'value' => $area_id,
- 'disabled' => $disabled);
- generate_select($params);
- echo "</div>\n";
- } //if count($areas)
- }
Advertisement
Add Comment
Please, Sign In to add comment