Changing "NOT DELETED" to "UNDELETED" per Seth and Marc's suggestion.
[squirrelmail.git] / functions / forms.php
index 710f962be1fbf843fc64457af4f303c09046e5e5..d1a96888e3fbb794d676b052a8d84510c5df55de 100644 (file)
@@ -2,7 +2,7 @@
 /**
  * forms.php
  *
- * Copyright (c) 2004 The SquirrelMail Project Team
+ * Copyright (c) 2004-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Functions to build HTML forms in a safe and consistent manner.
  * Helper function to create form fields, not to be called directly,
  * only by other functions below.
  */
-function addInputField($type, $name = null, $value = null, $attributes = '') {
+function addInputField($type, $name = null, $value = null, $attributes = '', $id = null) {
     return '<input type="'.$type.'"'.
         ($name  !== null ? ' name="'.htmlspecialchars($name).'"'   : '').
+        ($id  !== null ? ' id="'.htmlspecialchars($id).'"'   
+            : ($name  !== null ? ' id="'.htmlspecialchars($name).'"'   : '')).
         ($value !== null ? ' value="'.htmlspecialchars($value).'"' : '').
         $attributes . " />\n";
 }
@@ -45,7 +47,7 @@ function addCheckBox($name, $checked = false, $value = null) {
  */
 function addRadioBox($name, $checked = false, $value = null) {
     return addInputField('radio', $name, $value,
-        ($checked ? ' checked="checked"' : ''));
+        ($checked ? ' checked="checked"' : ''), $name . $value);
 }
 
 /**
@@ -144,4 +146,4 @@ function addForm($action, $method = 'post', $name = '', $enctype = '', $charset
         $enctype . $name . $charset . ">\n";
 }
 
-?>
\ No newline at end of file
+?>