diff --git a/lam/docs/devel/modules-specification.htm b/lam/docs/devel/modules-specification.htm
index 265f8032..f380ece5 100644
--- a/lam/docs/devel/modules-specification.htm
+++ b/lam/docs/devel/modules-specification.htm
@@ -932,6 +932,12 @@ string. This is the list of option values the user can select.
options_selected: Array
of string. This is the list of pre selected elements, must contain
values that are also in options.
+
descriptiveOptions:
+Boolean value, if set to true then all elements in the options and
+options_selected arrays must be arrays themselves (array(value, description)) (default: false)
+
size: The size of the
select field, if set to 1 a dropdown box will be displayed.
noSorting: If set to
diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc
index 364449a0..05117a0c 100644
--- a/lam/lib/modules.inc
+++ b/lam/lib/modules.inc
@@ -641,13 +641,21 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
}
if (isset($values[$input[$i][$j]['name']])) $input[$i][$j]['options_selected'] = $values[$input[$i][$j]['name']];
// merge both option arrays and sort them.
- $options = array_merge ($input[$i][$j]['options'], $input[$i][$j]['options_selected'] );
- $options = array_unique($options);
+ $options = $input[$i][$j]['options'];
+ if (!isset($input[$i][$j]['descriptiveOptions']) || ($input[$i][$j]['descriptiveOptions'] === false)) {
+ // merge both option arrays and sort them.
+ $options = array_merge($input[$i][$j]['options'], $input[$i][$j]['options_selected'] );
+ $options = array_unique($options);
+ }
if (!isset($input[$i][$j]['noSorting']) || !$input[$i][$j]['noSorting']) {
sort($options);
}
foreach ($options as $option) {
- if ($option!='') {
+ if (isset($input[$i][$j]['descriptiveOptions']) && ($input[$i][$j]['descriptiveOptions'] === true)) {
+ if (in_array($option[0], $input[$i][$j]['options_selected'])) echo "\n";
+ else echo "\n";
+ }
+ elseif ($option!='') {
if (in_array($option, $input[$i][$j]['options_selected'])) echo "\n";
else echo "\n";
}
@@ -695,6 +703,7 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindex
return $ret;
}
+
/**
* This class includes all modules and attributes of an account.
*