function generate_presentation_options(&$vars) { global $times_somewhere, $report_presentation_field_order; echo "<fieldset>\n"; echo "<legend>" . get_vocab("presentation_options") . "</legend>\n"; foreach ($report_presentation_field_order as $key) { switch ($key) { case 'output': echo "<div id=\"div_output\">\n"; $buttons = array(REPORT => get_vocab('report'), SUMMARY => get_vocab('summary')); $params = array('label' => get_vocab('output') . ":", 'name' => 'output', 'value' => $vars['output'], 'options' => $buttons); generate_radio_group($params); echo "</div>\n"; break; case 'output_format': echo "<div id=\"div_format\">\n"; $buttons = array(OUTPUT_HTML => get_vocab('html'), OUTPUT_CSV => get_vocab('csv')); // The iCal output button if ($times_somewhere) { $buttons[OUTPUT_ICAL] = "ical"; } $params = array('label' => get_vocab('format') . ":", 'name' => 'output_format', 'value' => $vars['output_format'], 'options' => $buttons); generate_radio_group($params); echo "</div>\n"; break; case 'sortby': echo "<div id=\"div_sortby\">\n"; $options = array('r' => get_vocab("sort_room"), 's' => get_vocab("sort_rep_time")); $params = array('label' => get_vocab("sort_rep") . ':', 'name' => 'sortby', 'options' => $options, 'value' => $vars['sortby']); generate_radio_group($params); echo "</div>\n"; break; case 'sumby': echo "<div id=\"div_sumby\">\n"; $options = array('d' => get_vocab("sum_by_descrip"), 'c' => get_vocab("sum_by_creator"), 't' => get_vocab("sum_by_type")); $params = array('label' => get_vocab("summarize_by") . ':', 'name' => 'sumby', 'options' => $options, 'value' => $vars['sumby']); generate_radio_group($params); echo "</div>\n"; break; default: break; } // switch } // foreach echo "</fieldset>\n"; }
function create_field_entry_privacy_status($disabled = FALSE) { global $private_enabled, $private, $private_mandatory; // Privacy status if ($private_enabled) { echo "<div id=\"div_privacy_status\">\n"; $buttons[0] = get_vocab("public"); $buttons[1] = get_vocab("private"); $params = array('label' => get_vocab("privacy_status") . ":", 'name' => 'private', 'value' => $private ? 1 : 0, 'options' => $buttons, 'force_assoc' => TRUE, 'disabled' => $private_mandatory || $disabled); generate_radio_group($params); echo "</div>\n"; } }
echo "<fieldset>\n"; echo "<legend>" . get_vocab("private_settings") . "</legend>\n"; // Private enabled echo "<div>\n"; $params = array('label' => get_vocab("allow_private") . ":", 'name' => 'area_private_enabled', 'value' => $private_enabled); generate_checkbox($params); echo "</div>\n"; // Private mandatory echo "<div>\n"; $params = array('label' => get_vocab("force_private") . ":", 'name' => 'area_private_mandatory', 'value' => $private_mandatory); generate_checkbox($params); echo "</div>\n"; // Default privacy settings $options = array('1' => get_vocab("default_private"), '0' => get_vocab("default_public")); $params = array('label' => get_vocab("default_settings"), 'name' => 'area_private_default', 'options' => $options, 'force_assoc' => TRUE, 'value' => $private_default ? '1' : '0'); generate_radio_group($params); echo "</fieldset>\n"; echo "<fieldset>\n"; echo "<legend>" . get_vocab("private_display") . "</legend>\n"; echo "<label>" . get_vocab("private_display_label"); echo "<span id=\"private_display_caution\">"; echo get_vocab("private_display_caution"); echo "</span>"; echo "</label>\n"; echo "<div class=\"group\" id=\"private_override\">\n"; $options = array('none' => get_vocab("treat_respect"), 'private' => get_vocab("treat_private"), 'public' => get_vocab("treat_public")); foreach ($options as $value => $text) { echo "<div>\n"; $params = array('name' => 'area_private_override', 'options' => array($value => $text), 'value' => $private_override); generate_radio($params); echo "</div>\n";
echo get_vocab("presentation_options"); ?> </legend> <?php echo "<div id=\"div_output\">\n"; $buttons = array(REPORT => "report", SUMMARY => "summary"); generate_radio_group(get_vocab('output'), 'output', $output, $buttons); echo "</div>\n"; echo "<div id=\"div_format\">\n"; $buttons = array(OUTPUT_HTML => "html", OUTPUT_CSV => "csv"); // The iCal output button if ($times_somewhere) { $buttons[OUTPUT_ICAL] = "ical"; } generate_radio_group(get_vocab("format"), 'output_format', $output_format, $buttons); echo "</div>\n"; ?> <div id="div_sortby"> <label><?php echo get_vocab("sort_rep"); ?> :</label> <div class="group"> <label> <input class="radio" type="radio" name="sortby" value="r" <?php if ($sortby == "r") { echo " checked=\"checked\"";