CC-2425:Tweak phone home
- privacy check box is uncheck by defalut - 'Yes' button is disabled on popup form by default - custom error msg is added for privacy checkbox on preference form - promote form is hidden by default
This commit is contained in:
parent
1243c60442
commit
c5ec6b5a53
6 changed files with 52 additions and 14 deletions
|
@ -140,8 +140,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
// checkbox for privacy policy
|
||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"\">privacy policy</a>.")
|
||||
->setDecorators(array('ViewHelper'))
|
||||
->setValue(1);
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,6 +128,24 @@ class Application_Form_SupportPreferences extends Zend_Form_SubForm
|
|||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
// checkbox for privacy policy
|
||||
$checkboxPrivacy = new Zend_Form_Element_Checkbox("Privacy");
|
||||
$checkboxPrivacy->setLabel("By checking this box, I agree to Sourcefabric's <a id=\"link_to_privacy\" href=\"\">privacy policy</a>.")
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
}
|
||||
|
||||
// overwriting isValid function
|
||||
public function isValid ($data)
|
||||
{
|
||||
parent::isValid($data);
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue