SAAS-41: Changed name of boolean value from disable-stream-conf to

enable-stream-conf for easier logic.
This commit is contained in:
Paul Baranowski 2011-09-29 18:11:22 -04:00
parent 8ef8dbc668
commit 44481d2776
5 changed files with 72 additions and 72 deletions

View file

@ -193,7 +193,7 @@ class PreferenceController extends Zend_Controller_Action
}
}
$this->view->num_stream = $num_of_stream;
$this->view->disable_stream_conf = Application_Model_Preference::GetDisableStreamConf();
$this->view->enable_stream_conf = Application_Model_Preference::GetEnableStreamConf();
$this->view->form = $form;
}

View file

@ -20,7 +20,7 @@ class Application_Form_StreamSetting extends Zend_Form
->setRequired(false)
->setValue(($setting['output_sound_device'] == "true")?1:0)
->setDecorators(array('ViewHelper'));
if(Application_Model_Preference::GetDisableStreamConf() == "true"){
if (Application_Model_Preference::GetEnableStreamConf() == "false"){
$output_sound_device->setAttrib("readonly", true);
}
$this->addElement($output_sound_device);

View file

@ -37,7 +37,7 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm{
$this->setElementsBelongTo($prefix."_data");
$disable_all = false;
if(Application_Model_Preference::GetDisableStreamConf() == "true"){
if(Application_Model_Preference::GetEnableStreamConf() == "false"){
$disable_all = true;
}

View file

@ -427,12 +427,12 @@ class Application_Model_Preference
return self::GetValue("trial_end_date");
}
public static function SetDisableStreamConf($bool){
self::SetValue("disable_stream_conf", $bool);
public static function SetEnableStreamConf($bool){
self::SetValue("enable_stream_conf", $bool);
}
public static function GetDisableStreamConf(){
return self::GetValue("disable_stream_conf");
public static function GetEnableStreamConf(){
return self::GetValue("enable_stream_conf");
}
public static function GetAirtimeVersion(){

View file

@ -1,6 +1,6 @@
<div class="ui-widget ui-widget-content block-shadow simple-formblock clearfix padded-strong stream-config">
<h2 style="float:left">Stream Settings</h2>
<?php if($this->disable_stream_conf != "true"){?>
<?php if($this->enable_stream_conf == "true"){?>
<form method="post" action="/Preference/stream-setting" enctype="application/x-www-form-urlencoded">
<div class="button-bar bottom" id="submit-element" style="float:right">
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
@ -26,7 +26,7 @@
echo $this->form->getSubform("s".$i."_subform");
}
?>
<?php if($this->disable_stream_conf != "true"){?>
<?php if($this->enable_stream_conf == "true"){?>
<div class="button-bar bottom" id="submit-element">
<input type="submit" class="ui-button ui-state-default right-floated" value="Save" id="Save" name="Save" />
</div>