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

@ -3,29 +3,29 @@
class Application_Form_StreamSetting extends Zend_Form
{
private $setting;
public function init()
{
}
public function setSetting($setting){
$this->setting = $setting;
}
public function startFrom(){
public function startFrom() {
$setting = $this->setting;
$output_sound_device = new Zend_Form_Element_Checkbox('output_sound_device');
$output_sound_device->setLabel('Enabled')
->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);
}
public function isValid($data){
$this->populate(array("output_sound_device"=>$data));
return true;