Let edit list users turn off the 'add widget'; add submit option type
[squirrelmail.git] / templates / default / edit_list_widget_list_style.tpl
index 7d54d7d75330640fae2afa32092eb8300b3cae10..53e547b09df223e412bf187d16f4c8d038d7071f 100644 (file)
@@ -7,16 +7,17 @@
   *
   * The following variables are available in this template:
   *
-  * string  $name            The name of the edit list
-  * string  $input_widget    A preconstructed input text box used
-  *                          for adding new elements to the edit list
-  * string  $select_widget   A preconstructed input text box used
-  * string  $checkbox_widget A preconstructed input text box used
-  * string  $trailing_text   Any text given by the caller to be displayed
-  *                          after the edit list input
-  * array   $possible_values The original list of options in the edit list,
-  *                          for use constructing layouts alternative to
-  *                          the select widget
+  * string   $name              The name of the edit list
+  * string   $input_widget      A preconstructed input text box used
+  *                             for adding new elements to the edit list
+  * boolean  $use_input_widget  Whether or not to present the $input_widget
+  * string   $select_widget     A preconstructed input text box used
+  * string   $checkbox_widget   A preconstructed input text box used
+  * string   $trailing_text     Any text given by the caller to be displayed
+  *                             after the edit list input
+  * array    $possible_values   The original list of options in the edit list,
+  *                             for use constructing layouts alternative to
+  *                             the select widget
   *
   * @copyright © 1999-2008 The SquirrelMail Project Team
   * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 extract($t);
 
 
-echo '<table class="table2" cellspacing="0"><tr><td>'
-   . _("Add") . '&nbsp;' . $input_widget . '<br />'
-   . '<table class="table_messageList" cellspacing="0">';
+echo '<table class="table2" cellspacing="0"><tr><td>';
+
+if ($use_input_widget)
+    echo _("Add") . '&nbsp;' . $input_widget . '<br />';
+
+echo '<table class="table_messageList" cellspacing="0">';
 
 $class = 'even';
 $index = 0;