From d0211aaca9fbe77e247f4d2097588c8ff08e7318 Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 18 May 2012 19:08:50 -0400 Subject: [PATCH] SAAS-208: airtime-system: create a option which can set the live stream connection setting -done --- .../application/forms/GeneralPreferences.php | 3 +- .../forms/LiveStreamingPreferences.php | 7 +- .../scripts/form/preferences_livestream.phtml | 136 ++++++++++-------- 3 files changed, 78 insertions(+), 68 deletions(-) diff --git a/airtime_mvc/application/forms/GeneralPreferences.php b/airtime_mvc/application/forms/GeneralPreferences.php index aa6b52b56..472765d26 100644 --- a/airtime_mvc/application/forms/GeneralPreferences.php +++ b/airtime_mvc/application/forms/GeneralPreferences.php @@ -7,8 +7,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm public function init() { $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true; - $this->isSaas = $isSaas; - Logging::log($this->isSaas==true?"true":"false"); + $this->isSaas = $isSaas; $this->setDecorators(array( array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas)) diff --git a/airtime_mvc/application/forms/LiveStreamingPreferences.php b/airtime_mvc/application/forms/LiveStreamingPreferences.php index fe318d692..54e934284 100644 --- a/airtime_mvc/application/forms/LiveStreamingPreferences.php +++ b/airtime_mvc/application/forms/LiveStreamingPreferences.php @@ -2,7 +2,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm { - + public function init() { $defaultFade = Application_Model_Preference::GetDefaultTransitionFade(); @@ -85,6 +85,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm $m_mount = Application_Model_StreamSetting::GetMasterLiveSteamMountPoint(); $l_port = Application_Model_StreamSetting::GetDJLiveSteamPort(); $l_mount = Application_Model_StreamSetting::GetDJLiveSteamMountPoint(); + $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true; $master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL(); $live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL(); @@ -100,7 +101,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm } $this->setDecorators(array( - array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url)) + array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url, 'isSaas' => $isSaas)) )); } @@ -149,4 +150,4 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm return $isValid; } -} \ No newline at end of file +} diff --git a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml index ae3514cdf..428af66fd 100644 --- a/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml +++ b/airtime_mvc/application/views/scripts/form/preferences_livestream.phtml @@ -1,7 +1,7 @@
Input Stream Settings
-
+
@@ -43,80 +43,90 @@ -
- -
-
- element->getElement('master_harbor_input_port') ?> - element->getElement('master_harbor_input_port')->hasErrors()) : ?> -
    - element->getElement('master_harbor_input_port')->getMessages() as $error): ?> -
  • - -
- -
-
- -
-
- element->getElement('master_harbor_input_mount_point') ?> - element->getElement('master_harbor_input_mount_point')->hasErrors()) : ?> -
    - element->getElement('master_harbor_input_mount_point')->getMessages() as $error): ?> -
  • - -
- -
+ isSaas ){?> +
+ +
+
+ element->getElement('master_harbor_input_port') ?> + element->getElement('master_harbor_input_port')->hasErrors()) : ?> +
    + element->getElement('master_harbor_input_port')->getMessages() as $error): ?> +
  • + +
+ +
+
+ +
+
+ element->getElement('master_harbor_input_mount_point') ?> + element->getElement('master_harbor_input_mount_point')->hasErrors()) : ?> +
    + element->getElement('master_harbor_input_mount_point')->getMessages() as $error): ?> +
  • + +
+ +
+
- master_dj_connection_url ?> override   - -
+ master_dj_connection_url ?> + isSaas ){?> + override   + +
+
-
- -
-
- element->getElement('dj_harbor_input_port') ?> - element->getElement('dj_harbor_input_port')->hasErrors()) : ?> -
    - element->getElement('dj_harbor_input_port')->getMessages() as $error): ?> -
  • - -
- -
-
- -
-
- element->getElement('dj_harbor_input_mount_point') ?> - element->getElement('dj_harbor_input_mount_point')->hasErrors()) : ?> -
    - element->getElement('dj_harbor_input_mount_point')->getMessages() as $error): ?> -
  • - -
- -
+ isSaas ){?> +
+ +
+
+ element->getElement('dj_harbor_input_port') ?> + element->getElement('dj_harbor_input_port')->hasErrors()) : ?> +
    + element->getElement('dj_harbor_input_port')->getMessages() as $error): ?> +
  • + +
+ +
+
+ +
+
+ element->getElement('dj_harbor_input_mount_point') ?> + element->getElement('dj_harbor_input_mount_point')->hasErrors()) : ?> +
    + element->getElement('dj_harbor_input_mount_point')->getMessages() as $error): ?> +
  • + +
+ +
+
- live_dj_connection_url ?> override   - -
+ live_dj_connection_url ?> + isSaas ){?> + override   + +
+