Merge branch '1.9.1' into devel
Conflicts: VERSION airtime_mvc/application/configs/constants.php airtime_mvc/application/models/Preference.php install_minimal/include/airtime-db-install.php install_minimal/include/airtime-upgrade.php python_apps/api_clients/api_client.py
This commit is contained in:
commit
9eb21cb327
27 changed files with 686 additions and 95 deletions
|
@ -8,10 +8,15 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
$this->setAction('/Nowplaying');
|
||||
$this->setMethod('post');
|
||||
|
||||
$country_list = Application_Model_Preference::GetCountryList();
|
||||
|
||||
$country_list = Application_Model_Preference::GetCountryList();
|
||||
|
||||
$privacyChecked = false;
|
||||
if(Application_Model_Preference::GetPrivacyPolicyCheck() == 1){
|
||||
$privacyChecked = true;
|
||||
}
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/register-dialog.phtml')),
|
||||
array('ViewScript', array('viewScript' => 'form/register-dialog.phtml', 'privacyChecked'=>$privacyChecked)),
|
||||
array('File', array('viewScript' => 'form/register-dialog.phtml', 'placement' => false)))
|
||||
);
|
||||
|
||||
|
@ -143,5 +148,22 @@ class Application_Form_RegisterAirtime extends Zend_Form
|
|||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($checkboxPrivacy);
|
||||
}
|
||||
|
||||
// overriding isValid function
|
||||
public function isValid ($data)
|
||||
{
|
||||
$isValid = parent::isValid($data);
|
||||
if($data['Publicise'] != 1){
|
||||
$isValid = true;
|
||||
}
|
||||
if(isset($data["Privacy"])){
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
|
||||
public function init()
|
||||
{
|
||||
$country_list = Application_Model_Preference::GetCountryList();
|
||||
|
||||
$country_list = Application_Model_Preference::GetCountryList();
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/support-setting.phtml')),
|
||||
array('File', array('viewScript' => 'form/support-setting.phtml', 'placement' => false)))
|
||||
|
@ -157,14 +157,19 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
$this->addElement($submit);
|
||||
}
|
||||
|
||||
// overwriting isValid function
|
||||
// overriding isValid function
|
||||
public function isValid ($data)
|
||||
{
|
||||
$isValid = parent::isValid($data);
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||
$isValid = false;
|
||||
if($data['Publicise'] != 1){
|
||||
$isValid = true;
|
||||
}
|
||||
if(isset($data["Privacy"])){
|
||||
$checkPrivacy = $this->getElement('Privacy');
|
||||
if($data["SupportFeedback"] == "1" && $data["Privacy"] != "1"){
|
||||
$checkPrivacy->addError("You have to agree to privacy policy.");
|
||||
$isValid = false;
|
||||
}
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue