diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index d93dcb6a..3f421fc2 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -526,6 +526,127 @@ function doUploadPostActions($scope, $data, $ids, $failed) { return $return; } +/** +* Takes a list of meta-HTML elements and prints the equivalent HTML output. +* +* @param string $module Name of account module +* @param array $input List of meta-HTML elements +* @param array $values List of values which override the defaults in $input (name => value) +* @param boolean $restricted If true then no buttons will be displayed +* @param integer $tabindex Start value of tabulator index for input fields +* @param integer $tabindexLink Start value of tabulator index for links +*/ +function parseHtml($module, $input, $values, $restricted, &$tabindex, &$tabindexLink) { + if (is_array($input)) { + echo "
\n"; - $output = "\n"; - echo "\n"; - break; - case 'select': - if (!is_array($input[$i][$j]['options'])) $input[$i][$j]['options'] = array ( $input[$i][$j]['options'] ); - if (isset($input[$i][$j]['options_selected'])) { - if (!is_array($input[$i][$j]['options_selected'])) { - // one selected element - $input[$i][$j]['options_selected'] = array ( $input[$i][$j]['options_selected'] ); - } - } - else { - $input[$i][$j]['options_selected'] = array(); - } - echo " | \n"; - echo " | \n"; - break; - case 'table': - echo "\n"; - $this->parse_html($module, $input[$i][$j]['value'], $y, $z); - echo " | \n"; - break; - case 'help': - echo "\n"; - echo "type . " target=\"help\" tabindex=$z>" . _('Help') . " | \n"; - $z++; - break; - case 'message': - echo "\n"; - StatusMessage($input[$i][$j]['type'], $input[$i][$j]['headline'], $input[$i][$j]['text']); - echo " | \n"; - break; - default: - echo "Unrecognized type: " . $input[$i][$j]['kind'] . " | \n"; - break; - } - } - echo "\n"; - } - } - echo "