CC-4730: Support Feedback: Errors are displayed when they shouldn't be

This commit is contained in:
denise 2012-12-04 15:30:56 -05:00
parent ee086fe43a
commit 844246df3a
1 changed files with 7 additions and 9 deletions

View File

@ -164,16 +164,14 @@ class Application_Form_SupportSettings extends Zend_Form
public function isValid ($data) public function isValid ($data)
{ {
$isValid = parent::isValid($data); $isValid = parent::isValid($data);
if ($data['Publicise'] != 1) {
$isValid = true; if (isset($data["Privacy"])) {
} $checkPrivacy = $this->getElement('Privacy');
if (isset($data["Privacy"])) { if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") {
$checkPrivacy = $this->getElement('Privacy'); $checkPrivacy->addError(_("You have to agree to privacy policy."));
if ($data["SupportFeedback"] == "1" && $data["Privacy"] != "1") { $isValid = false;
$checkPrivacy->addError(_("You have to agree to privacy policy."));
$isValid = false;
}
} }
}
return $isValid; return $isValid;
} }