CC-4730: Support Feedback: Errors are displayed when they shouldn't be
This commit is contained in:
parent
ee086fe43a
commit
844246df3a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue