CC-3224: "On-the-fly" stream rebroadcasting
- Form in preference section
This commit is contained in:
parent
309c6da83d
commit
ca04a7a686
6 changed files with 142 additions and 1 deletions
43
airtime_mvc/application/forms/LiveStreamingPreferences.php
Normal file
43
airtime_mvc/application/forms/LiveStreamingPreferences.php
Normal file
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
require_once 'customvalidators/ConditionalNotEmpty.php';
|
||||
require_once 'customvalidators/PasswordNotEmpty.php';
|
||||
|
||||
class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml'))
|
||||
));
|
||||
|
||||
//enable Auto-enable for all shows
|
||||
$auto_enable = new Zend_Form_Element_Checkbox('auto_enable_live_stream');
|
||||
$auto_enable->setLabel('Auto-enable for all shows')
|
||||
->setRequired(false)
|
||||
->setValue(Application_Model_Preference::GetLiveSteamAutoEnable())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($auto_enable);
|
||||
|
||||
//Master username
|
||||
$master_username = new Zend_Form_Element_Text('master_username');
|
||||
$master_username->setAttrib('class', 'input_text')
|
||||
->setLabel('Master Username')
|
||||
->setFilters(array('StringTrim'))
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($master_username);
|
||||
|
||||
//Master password
|
||||
$master_password = new Zend_Form_Element_Text('master_password');
|
||||
$master_password->setAttrib('class', 'input_text')
|
||||
->setAttrib('autocomplete', 'off')
|
||||
->setAttrib('renderPassword', true)
|
||||
->setLabel('Master Password')
|
||||
->setFilters(array('StringTrim'))
|
||||
->setValidators(array(new ConditionalNotEmpty(array('auto_enable_live_stream'=>'1'))))
|
||||
->setValue(Application_Model_Preference::GetLiveSteamMasterUsername())
|
||||
->setDecorators(array('ViewHelper'));
|
||||
$this->addElement($master_password);
|
||||
}
|
||||
}
|
|
@ -14,6 +14,9 @@ class Application_Form_Preferences extends Zend_Form
|
|||
|
||||
$general_pref = new Application_Form_GeneralPreferences();
|
||||
$this->addSubForm($general_pref, 'preferences_general');
|
||||
|
||||
$livestream_pref = new Application_Form_LiveStreamingPreferences();
|
||||
$this->addSubForm($livestream_pref, 'preferences_livestream');
|
||||
|
||||
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
||||
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue