+ /**
+ * Create folder selection box
+ * @return string html formated selection box
+ */
+ function createWidget_FolderList() {
+ $selected = array(strtolower($this->value));
+
+ /* set initial value */
+ $result = '';
+
+ /* 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, $this->folder_filter);
+ } 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;
+ }
+
+
+ if (empty($result)) {
+ // string is displayed when interface can't build folder selection box
+ return _("unavailable");
+ } else {
+ /* Begin the select tag. */
+ $ret = "<select name=\"new_$this->name\" $this->script>\n";
+ $ret.= $result;
+ /* Close the select tag and return our happy result. */
+ $ret.= "</select>\n";
+ return ($ret);
+ }
+ }
+
+ /**
+ * Creates textarea
+ * @return string html formated textarea field
+ */