public function updateVariables()
 {
     $CC_CONFIG = Config::getConfig();
     $isDemo = isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1;
     $master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL();
     $live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
     $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, 'isDemo' => $isDemo))));
 }
 public function updateVariables()
 {
     global $CC_CONFIG;
     $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled' ? false : true;
     $isDemo = isset($CC_CONFIG['demo']) && $CC_CONFIG['demo'] == 1;
     $master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL();
     $live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
     $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, 'isSaas' => $isSaas, 'isDemo' => $isDemo))));
 }
 public function init()
 {
     $cb_airtime_auth = new Zend_Form_Element_Checkbox("cb_airtime_auth");
     $cb_airtime_auth->setLabel(_("Use Airtime Authentication:"))->setRequired(false)->setDecorators(array('ViewHelper'));
     $this->addElement($cb_airtime_auth);
     $cb_custom_auth = new Zend_Form_Element_Checkbox("cb_custom_auth");
     $cb_custom_auth->setLabel(_("Use Custom Authentication:"))->setRequired(false)->setDecorators(array('ViewHelper'));
     $this->addElement($cb_custom_auth);
     //custom username
     $custom_username = new Zend_Form_Element_Text('custom_username');
     $custom_username->setAttrib('class', 'input_text')->setAttrib('autocomplete', 'off')->setAllowEmpty(true)->setLabel(_('Custom Username'))->setFilters(array('StringTrim'))->setValidators(array(new ConditionalNotEmpty(array("cb_custom_auth" => "1"))))->setDecorators(array('ViewHelper'));
     $this->addElement($custom_username);
     //custom password
     $custom_password = new Zend_Form_Element_Password('custom_password');
     $custom_password->setAttrib('class', 'input_text')->setAttrib('autocomplete', 'off')->setAttrib('renderPassword', 'true')->setAllowEmpty(true)->setLabel(_('Custom Password'))->setFilters(array('StringTrim'))->setValidators(array(new ConditionalNotEmpty(array("cb_custom_auth" => "1"))))->setDecorators(array('ViewHelper'));
     $this->addElement($custom_password);
     $connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
     if (trim($connection_url) == "") {
         $connection_url = "N/A";
     }
     $this->setDecorators(array(array('ViewScript', array('viewScript' => 'form/add-show-live-stream.phtml', "connection_url" => $connection_url))));
 }