SAAS-876 - better implementation of toggle between Airtime Pro/Custom streaming options
This commit is contained in:
parent
37ed35f5b2
commit
c99165a8dd
|
@ -63,7 +63,7 @@ class Application_Form_StreamSetting extends Zend_Form
|
||||||
$custom = Application_Model_Preference::getUsingCustomStreamSettings();
|
$custom = Application_Model_Preference::getUsingCustomStreamSettings();
|
||||||
$customSettings = new Zend_Form_Element_Radio('customStreamSettings');
|
$customSettings = new Zend_Form_Element_Radio('customStreamSettings');
|
||||||
$customSettings->setLabel(_('Streaming Server:'));
|
$customSettings->setLabel(_('Streaming Server:'));
|
||||||
$customSettings->setMultiOptions(array(_("Airtime Pro Streaming"), _("Custom / 3rd Party")));
|
$customSettings->setMultiOptions(array(_("Airtime Pro Streaming"), _("Custom / 3rd Party Streaming")));
|
||||||
$customSettings->setValue(!empty($custom) ? $custom : 0);
|
$customSettings->setValue(!empty($custom) ? $custom : 0);
|
||||||
$this->addElement($customSettings);
|
$this->addElement($customSettings);
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,8 +192,10 @@ class Application_Form_StreamSettingSubForm extends Zend_Form_SubForm
|
||||||
{
|
{
|
||||||
$f_data = $data['s'.$this->prefix."_data"];
|
$f_data = $data['s'.$this->prefix."_data"];
|
||||||
$isValid = parent::isValid($f_data);
|
$isValid = parent::isValid($f_data);
|
||||||
|
// XXX: A couple of ugly workarounds here, but I guess that's what you get when you
|
||||||
|
// combine an already-complex POST and GET into a single action...
|
||||||
if (Application_Model_Preference::getUsingCustomStreamSettings() && $f_data) {
|
if (Application_Model_Preference::getUsingCustomStreamSettings() && $f_data) {
|
||||||
if ($f_data['enable'] == 1) {
|
if ($f_data['enable'] == 1 && isset($f_data["host"])) {
|
||||||
if ($f_data['host'] == '') {
|
if ($f_data['host'] == '') {
|
||||||
$element = $this->getElement("host");
|
$element = $this->getElement("host");
|
||||||
$element->addError(_("Server cannot be empty."));
|
$element->addError(_("Server cannot be empty."));
|
||||||
|
|
|
@ -28,7 +28,7 @@ function rebuildStreamURL(ele){
|
||||||
}else{
|
}else{
|
||||||
streamurl = "http://"+host+":"+port+"/"
|
streamurl = "http://"+host+":"+port+"/"
|
||||||
}
|
}
|
||||||
div.find("#stream_url").text(streamurl)
|
div.find("#stream_url").html('<a href="' + streamurl + '" target="_blank">' + streamurl + '</a>')
|
||||||
}
|
}
|
||||||
function restrictOggBitrate(ele, on){
|
function restrictOggBitrate(ele, on){
|
||||||
var div = ele.closest("div")
|
var div = ele.closest("div")
|
||||||
|
|
Loading…
Reference in New Issue