CC-3224: "On-the-fly" stream rebroadcasting
- interface implementation. subform within the show form.
This commit is contained in:
parent
ca04a7a686
commit
701ed82f40
|
@ -48,6 +48,10 @@ class PreferenceController extends Zend_Controller_Action
|
|||
Application_Model_Preference::SetSoundCloudGenre($values["preferences_soundcloud"]["SoundCloudGenre"]);
|
||||
Application_Model_Preference::SetSoundCloudTrackType($values["preferences_soundcloud"]["SoundCloudTrackType"]);
|
||||
|
||||
Application_Model_Preference::SetLiveSteamAutoEnable($values["preferences_livestream"]["auto_enable_live_stream"]);
|
||||
Application_Model_Preference::SetLiveSteamMasterUsername($values["preferences_livestream"]["master_username"]);
|
||||
Application_Model_Preference::SetLiveSteamMasterPassword($values["preferences_livestream"]["master_password"]);
|
||||
|
||||
Application_Model_Preference::SetSoundCloudLicense($values["preferences_soundcloud"]["SoundCloudLicense"]);
|
||||
|
||||
$this->view->statusMsg = "<div class='success'>Preferences updated.</div>";
|
||||
|
|
|
@ -411,6 +411,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$formWhen = new Application_Form_AddShowWhen();
|
||||
$formRepeats = new Application_Form_AddShowRepeats();
|
||||
$formStyle = new Application_Form_AddShowStyle();
|
||||
$formLive = new Application_Form_AddShowLiveStream();
|
||||
|
||||
$formWhat->removeDecorator('DtDdWrapper');
|
||||
$formWho->removeDecorator('DtDdWrapper');
|
||||
|
@ -423,6 +424,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->repeats = $formRepeats;
|
||||
$this->view->who = $formWho;
|
||||
$this->view->style = $formStyle;
|
||||
$this->view->live = $formLive;
|
||||
$this->view->addNewShow = false;
|
||||
|
||||
$show = new Application_Model_Show($showInstance->getShowId());
|
||||
|
@ -564,12 +566,14 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$formWhen = new Application_Form_AddShowWhen();
|
||||
$formRepeats = new Application_Form_AddShowRepeats();
|
||||
$formStyle = new Application_Form_AddShowStyle();
|
||||
$formLive = new Application_Form_AddShowLiveStream();
|
||||
|
||||
$formWhat->removeDecorator('DtDdWrapper');
|
||||
$formWho->removeDecorator('DtDdWrapper');
|
||||
$formWhen->removeDecorator('DtDdWrapper');
|
||||
$formRepeats->removeDecorator('DtDdWrapper');
|
||||
$formStyle->removeDecorator('DtDdWrapper');
|
||||
$formLive->removeDecorator('DtDdWrapper');
|
||||
|
||||
$what = $formWhat->isValid($data);
|
||||
$when = $formWhen->isValid($data);
|
||||
|
@ -686,6 +690,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->rr = $formRecord;
|
||||
$this->view->absoluteRebroadcast = $formAbsoluteRebroadcast;
|
||||
$this->view->rebroadcast = $formRebroadcast;
|
||||
$this->view->live = $formLive;
|
||||
$this->view->addNewShow = true;
|
||||
|
||||
//the form still needs to be "update" since
|
||||
|
@ -719,6 +724,8 @@ class ScheduleController extends Zend_Controller_Action
|
|||
$this->view->repeats = $formRepeats;
|
||||
$this->view->who = $formWho;
|
||||
$this->view->style = $formStyle;
|
||||
$this->view->live = $formLive;
|
||||
|
||||
if(!$isSaas){
|
||||
$this->view->rr = $formRecord;
|
||||
$this->view->absoluteRebroadcast = $formAbsoluteRebroadcast;
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
require_once 'customvalidators/ConditionalNotEmpty.php';
|
||||
|
||||
class Application_Form_AddShowLiveStream extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/add-show-live-stream.phtml'))
|
||||
));
|
||||
|
||||
$allow_live_stream = new Zend_Form_Element_Checkbox("allow_live_stream_override");
|
||||
$allow_live_stream->setLabel("Allow Live Stream Override")
|
||||
->setRequired(false)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($allow_live_stream);
|
||||
|
||||
$description1 = "This follows the same security pattern for the shows: if no users are explicitly set for the show, then anyone with a valid airtime login can connect to the stream, otherwise if there are users assigned to the show, then only those users can connect.";
|
||||
$security_setting1 = new Zend_Form_Element_Checkbox("security_setting1");
|
||||
$security_setting1->setLabel("Connect using Airtime username & password")
|
||||
->setDescription($description1)
|
||||
->setRequired(false)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($security_setting1);
|
||||
|
||||
$description2 = "Specifiy custom athentification which will work for only the show.";
|
||||
$security_setting2 = new Zend_Form_Element_Checkbox("security_setting2");
|
||||
$security_setting2 ->setLabel("Custom")
|
||||
->setDescription($description2)
|
||||
->setRequired(false)
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($security_setting2);
|
||||
|
||||
//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("security_setting2"=>"1"))))
|
||||
//fix//->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
->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("security_setting2"=>"1"))))
|
||||
//fix//->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($custom_password);
|
||||
}
|
||||
}
|
|
@ -1,6 +1,4 @@
|
|||
<?php
|
||||
require_once 'customvalidators/ConditionalNotEmpty.php';
|
||||
require_once 'customvalidators/PasswordNotEmpty.php';
|
||||
|
||||
class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
||||
{
|
||||
|
@ -22,6 +20,8 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
//Master username
|
||||
$master_username = new Zend_Form_Element_Text('master_username');
|
||||
$master_username->setAttrib('class', 'input_text')
|
||||
->setAttrib('autocomplete', 'off')
|
||||
->setAllowEmpty(true)
|
||||
->setLabel('Master Username')
|
||||
->setFilters(array('StringTrim'))
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
|
@ -29,14 +29,15 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
|||
$this->addElement($master_username);
|
||||
|
||||
//Master password
|
||||
$master_password = new Zend_Form_Element_Text('master_password');
|
||||
$master_password = new Zend_Form_Element_Password('master_password');
|
||||
$master_password->setAttrib('class', 'input_text')
|
||||
->setAttrib('autocomplete', 'off')
|
||||
->setAttrib('renderPassword', true)
|
||||
->setAttrib('renderPassword','true')
|
||||
->setAllowEmpty(true)
|
||||
->setLabel('Master Password')
|
||||
->setFilters(array('StringTrim'))
|
||||
->setValidators(array(new ConditionalNotEmpty(array('auto_enable_live_stream'=>'1'))))
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterPassword())
|
||||
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($master_password);
|
||||
}
|
||||
|
|
|
@ -727,7 +727,7 @@ class Application_Model_Preference
|
|||
}
|
||||
|
||||
public static function GetLiveSteamMasterPassword(){
|
||||
return self::GetValue("live_stream_master_username");
|
||||
return self::GetValue("live_stream_master_password");
|
||||
}
|
||||
|
||||
/* User specific preferences end */
|
||||
|
|
|
@ -742,22 +742,25 @@ class Application_Model_Schedule {
|
|||
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
|
||||
|
||||
$formWhat = new Application_Form_AddShowWhat();
|
||||
$formWho = new Application_Form_AddShowWho();
|
||||
$formWhen = new Application_Form_AddShowWhen();
|
||||
$formRepeats = new Application_Form_AddShowRepeats();
|
||||
$formStyle = new Application_Form_AddShowStyle();
|
||||
$formWho = new Application_Form_AddShowWho();
|
||||
$formWhen = new Application_Form_AddShowWhen();
|
||||
$formRepeats = new Application_Form_AddShowRepeats();
|
||||
$formStyle = new Application_Form_AddShowStyle();
|
||||
$formLive = new Application_Form_AddShowLiveStream();
|
||||
|
||||
$formWhat->removeDecorator('DtDdWrapper');
|
||||
$formWho->removeDecorator('DtDdWrapper');
|
||||
$formWhen->removeDecorator('DtDdWrapper');
|
||||
$formRepeats->removeDecorator('DtDdWrapper');
|
||||
$formStyle->removeDecorator('DtDdWrapper');
|
||||
$formWhat->removeDecorator('DtDdWrapper');
|
||||
$formWho->removeDecorator('DtDdWrapper');
|
||||
$formWhen->removeDecorator('DtDdWrapper');
|
||||
$formRepeats->removeDecorator('DtDdWrapper');
|
||||
$formStyle->removeDecorator('DtDdWrapper');
|
||||
$formLive->removeDecorator('DtDdWrapper');
|
||||
|
||||
$p_view->what = $formWhat;
|
||||
$p_view->when = $formWhen;
|
||||
$p_view->repeats = $formRepeats;
|
||||
$p_view->who = $formWho;
|
||||
$p_view->style = $formStyle;
|
||||
$p_view->live = $formLive;
|
||||
|
||||
$formWhat->populate(array('add_show_id' => '-1'));
|
||||
$formWhen->populate(array('add_show_start_date' => date("Y-m-d"),
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
<fieldset>
|
||||
<dl>
|
||||
<dt id="allow_live_stream_override-label">
|
||||
<label class="optional" for="allow_live_stream_override">
|
||||
<?php echo $this->element->getElement('allow_live_stream_override')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="allow_live_stream_override-element">
|
||||
<?php echo $this->element->getElement('allow_live_stream_override') ?>
|
||||
</dd>
|
||||
<dt id="security_setting1_override-label">
|
||||
<label class="optional" for="security_setting1">
|
||||
<?php echo $this->element->getElement('security_setting1')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="security_setting1_override-element">
|
||||
<?php echo $this->element->getElement('security_setting1') ?>
|
||||
</dd>
|
||||
<dt id="security_setting2_override-label">
|
||||
<label class="optional" for="security_setting2">
|
||||
<?php echo $this->element->getElement('security_setting2')->getLabel() ?>
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="security_setting2_override-element">
|
||||
<?php echo $this->element->getElement('security_setting2') ?>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt id="custom_username-label" class="block-display">
|
||||
<label class="optional" for="custom_username"><?php echo $this->element->getElement('custom_username')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="custom_username-element" class="block-display">
|
||||
<?php echo $this->element->getElement('custom_username') ?>
|
||||
<?php if($this->element->getElement('custom_username')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('custom_username')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="custom_password-label" class="block-display">
|
||||
<label class="optional" for="custom_password"><?php echo $this->element->getElement('custom_password')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="custom_password-element" class="block-display">
|
||||
<?php echo $this->element->getElement('custom_password') ?>
|
||||
<?php if($this->element->getElement('custom_password')->hasErrors()) : ?>
|
||||
<ul class='errors'>
|
||||
<?php foreach($this->element->getElement('custom_password')->getMessages() as $error): ?>
|
||||
<li><?php echo $error; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
|
|
@ -14,8 +14,7 @@
|
|||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="master_username-label" class="block-display">
|
||||
<label class="optional" for="master_username"><?php echo $this->element->getElement('master_username')->getLabel() ?>
|
||||
<span class="info-text-small">(Required)</span> :
|
||||
<label class="optional" for="master_username"><?php echo $this->element->getElement('master_username')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="master_username-element" class="block-display">
|
||||
|
@ -29,8 +28,7 @@
|
|||
<?php endif; ?>
|
||||
</dd>
|
||||
<dt id="master_password-label" class="block-display">
|
||||
<label class="optional" for="master_password"><?php echo $this->element->getElement('master_password')->getLabel() ?>
|
||||
<span class="info-text-small">(Required)</span> :
|
||||
<label class="optional" for="master_password"><?php echo $this->element->getElement('master_password')->getLabel() ?> :
|
||||
</label>
|
||||
</dt>
|
||||
<dd id="master_password-element" class="block-display">
|
||||
|
|
|
@ -16,6 +16,10 @@
|
|||
<?php echo $this->when; ?>
|
||||
<?php echo $this->repeats; ?>
|
||||
</div>
|
||||
<h3 class="collapsible-header"><span class="arrow-icon"></span>Live Stream</h3>
|
||||
<div id="live-stream-override" class="collapsible-content">
|
||||
<?php echo $this->live; ?>
|
||||
</div>
|
||||
<?php if(!$this->isSaas()){?>
|
||||
<h3 class="collapsible-header"><span class="arrow-icon"></span>Record & Rebroadcast</h3>
|
||||
<div id="schedule-record-rebroadcast" class="collapsible-content">
|
||||
|
|
|
@ -2,7 +2,12 @@ function showErrorSections() {
|
|||
|
||||
if($("#soundcloud-settings .errors").length > 0) {
|
||||
$("#soundcloud-settings").show();
|
||||
$(window).scrollTop($("soundcloud-settings .errors").position().top);
|
||||
$(window).scrollTop($("#soundcloud-settings .errors").position().top);
|
||||
}
|
||||
|
||||
if($("#livestream-settings .errors").length > 0) {
|
||||
$("#livestream-settings").show();
|
||||
$(window).scrollTop($("#livestream-settings .errors").position().top);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue