use_stylesheet('/scripts/jquery-simpletreemenu/css/jquery-simpleTreeMenu-1.1.0.css');
}
+function html_use_coolfieldset() {
+ html_use_jquery();
+ use_javascript('/scripts/coolfieldset/js/jquery.coolfieldset.js');
+ use_javascript('/js/jquery-common.js');
+ use_stylesheet('/scripts/coolfieldset/css/jquery.coolfieldset.css');
+}
+
/**
* html_build_select_box_from_arrays() - Takes two arrays, with the first array being the "id" or value and the other
* array being the text you want displayed.
* @param array Array of all allowed values from the full list.
*/
function html_build_select_box_from_arrays ($vals,$texts,$select_name,$checked_val='xzxz',$show_100=true,$text_100='none',$show_any=false,$text_any='any', $allowed=false) {
+ $have_a_subelement = false;
+
if ($text_100=='none'){
$text_100=_('None');
}
if ($show_any) {
$return .= '
<option value=""'.(($checked_val=='') ? ' selected="selected"' : '').'>'. util_html_secure($text_any) .'</option>';
+ $have_a_subelement = true;
}
//we don't always want the default 100 row shown
if ($show_100) {
$return .= '
<option value="100"'.(($checked_val==100) ? ' selected="selected"' : '').'>'. util_html_secure($text_100) .'</option>';
+ $have_a_subelement = true;
}
$checked_found=false;
$return .= ' disabled="disabled" class="option_disabled"';
}
$return .= '>'.util_html_secure($texts[$i]).'</option>';
+ $have_a_subelement = true;
}
}
//
if (!$checked_found && $checked_val != 'xzxz' && $checked_val && $checked_val != 100) {
$return .= '
<option value="'.util_html_secure($checked_val).'" selected="selected">'._('No Change').'</option>';
+ $have_a_subelement = true;
+ }
+
+ if (!$have_a_subelement) {
+ /* <select></select> without <option/> in between is invalid */
+ return '<!-- select without options -->';
}
$return .= '