From 670395bb2e782329690dbb64f27751f5524736c8 Mon Sep 17 00:00:00 2001 From: drigato Date: Thu, 9 Jul 2015 15:16:54 -0400 Subject: [PATCH] SAAS-939: Add option to preferences to display login button on radio page Change option to ON by default --- airtime_mvc/application/controllers/IndexController.php | 6 +++++- airtime_mvc/application/forms/GeneralPreferences.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/airtime_mvc/application/controllers/IndexController.php b/airtime_mvc/application/controllers/IndexController.php index 32e4a17a1..08c17b186 100644 --- a/airtime_mvc/application/controllers/IndexController.php +++ b/airtime_mvc/application/controllers/IndexController.php @@ -27,7 +27,11 @@ class IndexController extends Zend_Controller_Action $this->view->stationUrl = Application_Common_HTTPHelper::getStationUrl(); - $this->view->displayLoginButton = Application_Model_Preference::getRadioPageDisplayLoginButton(); + $displayRadioPageLoginButtonValue = Application_Model_Preference::getRadioPageDisplayLoginButton(); + if ($displayRadioPageLoginButtonValue == "") { + $displayRadioPageLoginButtonValue = true; + } + $this->view->displayLoginButton = $displayRadioPageLoginButtonValue; } diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index ff3cf4118..94230e667 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -143,9 +143,13 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm 'Errors', 'Label' )); + $displayRadioPageLoginButtonValue = Application_Model_Preference::getRadioPageDisplayLoginButton(); + if ($displayRadioPageLoginButtonValue == "") { + $displayRadioPageLoginButtonValue = true; + } $radioPageLoginButton->addDecorator('Label', array("class" => "enable-tunein")); $radioPageLoginButton->setLabel(_("Display login button on your Radio Page?")); - $radioPageLoginButton->setValue(Application_Model_Preference::getRadioPageDisplayLoginButton()); + $radioPageLoginButton->setValue($displayRadioPageLoginButtonValue); $this->addElement($radioPageLoginButton); }