+ $result .= "</select>$this->trailing_text\n";
+ return ($result);
+ }
+
+ function createWidget_FolderList() {
+ $selected = array(strtolower($this->value));
+
+ /* Begin the select tag. */
+ $result = "<select name=\"new_$this->name\" $this->script>\n";
+
+ /* Add each possible value to the select list. */
+ foreach ($this->possible_values as $real_value => $disp_value) {
+ if ( is_array($disp_value) ) {
+ /* For folder list, we passed in the array of boxes.. */
+ $new_option = sqimap_mailbox_option_list(0, $selected, 0, $disp_value);
+ } else {
+ /* Start the next new option string. */
+ $new_option = '<option value="' . htmlspecialchars($real_value) . '"';
+
+ /* If this value is the current value, select it. */
+ if ($real_value == $this->value) {
+ $new_option .= ' selected="selected"';
+ }
+
+ /* Add the display value to our option string. */
+ $new_option .= '>' . htmlspecialchars($disp_value) . "</option>\n";
+ }
+ /* And add the new option string to our select tag. */
+ $result .= $new_option;
+ }
+ /* Close the select tag and return our happy result. */
+ $result .= "</select>\n";