diff --git a/ingo/lib/Basic/Spam.php b/ingo/lib/Basic/Spam.php index 09d7c486251..c213318dabf 100644 --- a/ingo/lib/Basic/Spam.php +++ b/ingo/lib/Basic/Spam.php @@ -132,7 +132,12 @@ class Horde_Form_Type_ingo_folders extends Horde_Form_Type { function isValid(&$var, &$vars, $value, &$message) { - return true; + if (strlen($value)) { + return true; + } + + $message = _("A target folder is required."); + return false; } function getFolder() diff --git a/ingo/lib/Form/Spam.php b/ingo/lib/Form/Spam.php index d6ba0fbb119..05d8f6d876a 100644 --- a/ingo/lib/Form/Spam.php +++ b/ingo/lib/Form/Spam.php @@ -35,7 +35,7 @@ public function __construct($vars, $title = '', $name = null) $v = $this->addVariable(_("Spam Level:"), 'level', 'int', true, false, _("Messages with a likely spam score greater than or equal to this number will be treated as spam.")); $v->setHelp('spam-level'); - $this->folder_var = $this->addVariable(_("Folder to receive spam:"), 'folder', 'ingo_folders', false); + $this->folder_var = $this->addVariable(_("Folder to receive spam:"), 'folder', 'ingo_folders', true); $this->folder_var->setHelp('spam-folder'); $this->addHidden('', 'actionID', 'text', false); $this->addHidden('', 'folder_new', 'text', false); diff --git a/ingo/templates/flist/select.html.php b/ingo/templates/flist/select.html.php index 09c52106921..b0d6b5347d6 100644 --- a/ingo/templates/flist/select.html.php +++ b/ingo/templates/flist/select.html.php @@ -1,9 +1,9 @@ optionTag(null, _("Select target folder:")) . + $o = $this->optionTag('', _("Select target folder:")) . $this->optionTag(null, '- - - - - - - - - -', false, array('disabled' => true)); if ($this->create) { - $o .= $this->optionTag(null, _("Create new folder"), false, array('class' => 'flistCreate')) . + $o .= $this->optionTag('', _("Create new folder"), false, array('class' => 'flistCreate')) . $this->optionTag(null, '- - - - - - - - - -', false, array('disabled' => true)); }