diff msitegen.inc.php @ 747:330e6d79c5dc

Change stGetFormOptionList* function APIs a bit.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 20 Nov 2014 07:57:53 +0200
parents c9b96a7b9dc4
children c714140541d5
line wrap: on
line diff
--- a/msitegen.inc.php	Thu Nov 20 07:56:18 2014 +0200
+++ b/msitegen.inc.php	Thu Nov 20 07:57:53 2014 +0200
@@ -219,6 +219,7 @@
     ($onclick != "" ? " onClick=\"".$onclick."\"" : "")."> ".chentities($label)." </button>";
 }
 
+
 function stGetFormTextArea($rows, $cols, $name, $id, $prefix, $value, $extra = "")
 {
   return
@@ -287,10 +288,10 @@
 }
 
 
-function stGetFormOptionListItem($value, $active, $name)
+function stGetFormOptionListItem($indent, $value, $active, $name)
 {
   return
-    "<option value=\"".$value."\"".
+    $indent."<option value=\"".$value."\"".
     ($active ? " selected=\"selected\"" : "").
     ">".str_replace(" ", "&nbsp;", chentities($name))."</option>\n";
 }
@@ -310,7 +311,7 @@
 
   foreach ($data as $key => $value)
   {
-    $str .= stGetFormOptionListItem($key,
+    $str .= stGetFormOptionListItem($indent." ", $key,
       ($key == $active),
       is_array($value) ? $value[0] : $value);
   }