* 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
+ * boolean $use_delete_widget Whether or not to present the $checkbox_widget
+ * string $select_widget A preconstructed select widget containing
+ * all the elements in the list
+ * string $checkbox_widget A preconstructed checkbox used for deleting
+ * elements from the edit list
* 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
+ * @copyright 1999-2011 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id: select.tpl 12961 2008-02-24 22:35:08Z pdontthink $
* @package squirrelmail
if ($use_input_widget)
echo _("Add") . ' ' . $input_widget . '<br />';
-echo $select_widget
- . '<br />' . $checkbox_widget . ' <label for="delete_' . $name . '">'
- . _("Delete Selected") . '</label>';
+echo $select_widget;
+
+if (!empty($possible_values) && $use_delete_widget)
+ echo '<br />' . $checkbox_widget . ' <label for="delete_' . $name . '">'
+ . _("Delete Selected") . '</label>';