CC-3184 : Preferences: "Stream Label" needs to be moved to "Stream Settings"->"Global"
This commit is contained in:
parent
9275b21f48
commit
3cd11c696f
5 changed files with 61 additions and 59 deletions
|
@ -13,7 +13,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
if($defaultFade == ""){
|
||||
$defaultFade = '00:00:00.000000';
|
||||
}
|
||||
|
||||
|
||||
//Station name
|
||||
$this->addElement('text', 'stationName', array(
|
||||
'class' => 'input_text',
|
||||
|
@ -25,7 +25,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'ViewHelper'
|
||||
)
|
||||
));
|
||||
|
||||
|
||||
//Default station fade
|
||||
$this->addElement('text', 'stationDefaultFade', array(
|
||||
'class' => 'input_text',
|
||||
|
@ -41,15 +41,6 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
)
|
||||
));
|
||||
|
||||
$stream_format = new Zend_Form_Element_Radio('streamFormat');
|
||||
$stream_format->setLabel('Stream Label:');
|
||||
$stream_format->setMultiOptions(array("Artist - Title",
|
||||
"Show - Artist - Title",
|
||||
"Station name - Show name"));
|
||||
$stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat());
|
||||
$stream_format->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($stream_format);
|
||||
|
||||
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
|
||||
$third_party_api->setLabel('Allow Remote Websites To Access "Schedule" Info?<br> (Enable this to make front-end widgets work.)');
|
||||
$third_party_api->setMultiOptions(array("Disabled",
|
||||
|
@ -57,7 +48,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());
|
||||
$third_party_api->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($third_party_api);
|
||||
|
||||
|
||||
/* Form Element for setting the Timezone */
|
||||
$timezone = new Zend_Form_Element_Select("timezone");
|
||||
$timezone->setLabel("Timezone");
|
||||
|
@ -65,7 +56,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$timezone->setValue(Application_Model_Preference::GetTimezone());
|
||||
$timezone->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($timezone);
|
||||
|
||||
|
||||
/* Form Element for setting which day is the start of the week */
|
||||
$week_start_day = new Zend_Form_Element_Select("weekStartDay");
|
||||
$week_start_day->setLabel("Week Starts On");
|
||||
|
@ -74,7 +65,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$week_start_day->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($week_start_day);
|
||||
}
|
||||
|
||||
|
||||
private function getTimezones(){
|
||||
$regions = array(
|
||||
'Africa' => DateTimeZone::AFRICA,
|
||||
|
@ -86,9 +77,9 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'Indian' => DateTimeZone::INDIAN,
|
||||
'Pacific' => DateTimeZone::PACIFIC
|
||||
);
|
||||
|
||||
|
||||
$tzlist = array();
|
||||
|
||||
|
||||
foreach ($regions as $name => $mask){
|
||||
$ids = DateTimeZone::listIdentifiers($mask);
|
||||
foreach ($ids as $id){
|
||||
|
@ -98,7 +89,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
|
||||
return $tzlist;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function getWeekStartDays() {
|
||||
$days = array(
|
||||
|
@ -110,7 +101,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
'Friday',
|
||||
'Saturday'
|
||||
);
|
||||
return $days;
|
||||
return $days;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
$output_sound_device->setAttrib("readonly", true);
|
||||
}
|
||||
$this->addElement($output_sound_device);
|
||||
|
||||
|
||||
$output_types = array("ALSA"=>"ALSA", "AO"=>"AO", "OSS"=>"OSS", "Portaudio"=>"Portaudio", "Pulseaudio"=>"Pulseaudio");
|
||||
$output_type = new Zend_Form_Element_Select('output_sound_device_type');
|
||||
$output_type->setLabel("Output Type")
|
||||
|
@ -37,15 +37,15 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
}
|
||||
$this->addElement($output_type);
|
||||
}
|
||||
|
||||
|
||||
# tooltip
|
||||
$description = 'VLC and mplayer have a serious bug when playing an OGG/VORBIS
|
||||
stream that has metadata information enabled (stream metadata is the
|
||||
track title, show name, etc displayed in the audio player): they will
|
||||
disconnect from the stream after every song if this option is enabled.
|
||||
If your listeners do not require support for these audio players,
|
||||
$description = 'VLC and mplayer have a serious bug when playing an OGG/VORBIS
|
||||
stream that has metadata information enabled (stream metadata is the
|
||||
track title, show name, etc displayed in the audio player): they will
|
||||
disconnect from the stream after every song if this option is enabled.
|
||||
If your listeners do not require support for these audio players,
|
||||
then you should enable this option.';
|
||||
|
||||
|
||||
$icecast_vorbis_metadata = new Zend_Form_Element_Checkbox('icecast_vorbis_metadata');
|
||||
$icecast_vorbis_metadata->setLabel('Icecast Vorbis Metadata')
|
||||
->setDescription($description)
|
||||
|
@ -56,11 +56,20 @@ class Application_Form_StreamSetting extends Zend_Form
|
|||
$icecast_vorbis_metadata->setAttrib("readonly", true);
|
||||
}
|
||||
$this->addElement($icecast_vorbis_metadata);
|
||||
|
||||
$stream_format = new Zend_Form_Element_Radio('streamFormat');
|
||||
$stream_format->setLabel('Stream Label:');
|
||||
$stream_format->setMultiOptions(array("Artist - Title",
|
||||
"Show - Artist - Title",
|
||||
"Station name - Show name"));
|
||||
$stream_format->setValue(Application_Model_Preference::GetStreamLabelFormat());
|
||||
$stream_format->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($stream_format);
|
||||
}
|
||||
|
||||
public function isValid($data){
|
||||
$this->populate(array("output_sound_device"=>$data['output_sound_device'], "icecast_vorbis_metadata"=>$data['icecast_vorbis_metadata'],
|
||||
"output_sound_device_type"=>$data['output_sound_device_type']));
|
||||
"output_sound_device_type"=>$data['output_sound_device_type'], "streamFormat"=>$data['streamFormat']));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue