Merge branch 'master' of dev.sourcefabric.org:airtime

This commit is contained in:
martin 2011-04-04 13:55:49 -04:00
commit f067e54a37
9 changed files with 21 additions and 21 deletions

View File

@ -7,13 +7,13 @@ class Application_Form_AddShowRR extends Zend_Form_SubForm
{ {
// Add record element // Add record element
$this->addElement('checkbox', 'add_show_record', array( $this->addElement('checkbox', 'add_show_record', array(
'label' => 'Record', 'label' => 'Record?',
'required' => false, 'required' => false,
)); ));
// Add record element // Add record element
$this->addElement('checkbox', 'add_show_rebroadcast', array( $this->addElement('checkbox', 'add_show_rebroadcast', array(
'label' => 'Rebroadcast', 'label' => 'Rebroadcast?',
'required' => false, 'required' => false,
)); ));
} }

View File

@ -14,7 +14,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
"0" => "weekly", "0" => "weekly",
"1" => "bi-weekly", "1" => "bi-weekly",
"2" => "monthly" "2" => "monthly"
), ),
)); ));
// Add days checkboxes // Add days checkboxes
@ -45,18 +45,18 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',
array('date', false, array('YYYY-MM-DD')) array('date', false, array('YYYY-MM-DD'))
) )
)); ));
// Add no end element // Add no end element
$this->addElement('checkbox', 'add_show_no_end', array( $this->addElement('checkbox', 'add_show_no_end', array(
'label' => 'no end', 'label' => 'No End?',
'required' => false, 'required' => false,
)); ));
} }
public function checkReliantFields($formData) { public function checkReliantFields($formData) {
$start_timestamp = $formData['add_show_start_date']; $start_timestamp = $formData['add_show_start_date'];
$end_timestamp = $formData['add_show_end_date']; $end_timestamp = $formData['add_show_end_date'];
@ -67,7 +67,7 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
$this->getElement('add_show_end_date')->setErrors(array('End date must be after start date')); $this->getElement('add_show_end_date')->setErrors(array('End date must be after start date'));
return false; return false;
} }
return true; return true;
} }

View File

@ -21,7 +21,7 @@ class Application_Form_AddShowStyle extends Zend_Form_SubForm
// Add show color input // Add show color input
$this->addElement('text', 'add_show_color', array( $this->addElement('text', 'add_show_color', array(
'label' => 'Text Colour', 'label' => 'Text Colour:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));

View File

@ -16,7 +16,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
// Add URL element // Add URL element
$this->addElement('text', 'add_show_url', array( $this->addElement('text', 'add_show_url', array(
'label' => 'Website:', 'label' => 'URL:',
'class' => 'input_text', 'class' => 'input_text',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
@ -29,7 +29,7 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'class' => 'input_text', 'class' => 'input_text',
'required' => false, 'required' => false,
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add the description element // Add the description element
$this->addElement('textarea', 'add_show_description', array( $this->addElement('textarea', 'add_show_description', array(

View File

@ -19,7 +19,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',
array('date', false, array('YYYY-MM-DD')) array('date', false, array('YYYY-MM-DD'))
) )
)); ));
// Add start time element // Add start time element
@ -33,7 +33,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
'NotEmpty', 'NotEmpty',
array('date', false, array('HH:mm')), array('date', false, array('HH:mm')),
array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered')) array('regex', false, array('/^[0-9:]+$/', 'messages' => 'Invalid character entered'))
) )
)); ));
// Add duration element // Add duration element
@ -45,22 +45,22 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
'NotEmpty', 'NotEmpty',
array('regex', false, array('regex', false,
array('/^\d+:[0-5][0-9]$/', array('/^\d+:[0-5][0-9]$/',
'messages' => 'enter a duration: HH:mm')) 'messages' => 'enter a duration: HH:mm'))
) )
)); ));
// Add repeats element // Add repeats element
$this->addElement('checkbox', 'add_show_repeats', array( $this->addElement('checkbox', 'add_show_repeats', array(
'label' => 'repeats', 'label' => 'Repeats?',
'required' => false, 'required' => false,
)); ));
} }
public function checkReliantFields($formData) { public function checkReliantFields($formData) {
$valid = true; $valid = true;
$now_timestamp = date("Y-m-d H:i:s"); $now_timestamp = date("Y-m-d H:i:s");
@ -78,7 +78,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
$this->getElement('add_show_duration')->setErrors(array('Cannot have duration 00:00')); $this->getElement('add_show_duration')->setErrors(array('Cannot have duration 00:00'));
$valid = false; $valid = false;
} }
return $valid; return $valid;
} }

View File

@ -7,7 +7,7 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm
{ {
// Add hosts autocomplete // Add hosts autocomplete
$this->addElement('text', 'add_show_hosts_autocomplete', array( $this->addElement('text', 'add_show_hosts_autocomplete', array(
'label' => 'Type a Host:', 'label' => 'Search Users:',
'class' => 'input_text ui-autocomplete-input', 'class' => 'input_text ui-autocomplete-input',
'required' => false 'required' => false
)); ));

View File

@ -52,7 +52,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
$this->addElement($stream_format); $this->addElement($stream_format);
$third_party_api = new Zend_Form_Element_Radio('thirdPartyApi'); $third_party_api = new Zend_Form_Element_Radio('thirdPartyApi');
$third_party_api->setLabel('Allow Remote Websites To Access Show Schedule Info'); $third_party_api->setLabel('Allow Remote Websites To Access "Schedule" Info?<br> (Enable this on to make frontend widgets work.)');
$third_party_api->setMultiOptions(array("Disabled", $third_party_api->setMultiOptions(array("Disabled",
"Enabled")); "Enabled"));
$third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi()); $third_party_api->setValue(Application_Model_Preference::GetAllow3rdPartyApi());

View File

@ -45,7 +45,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
// Add the description element // Add the description element
$this->addElement('textarea', 'SoundCloudTags', array( $this->addElement('textarea', 'SoundCloudTags', array(
'label' => 'space separated SoundCloud Tags', 'label' => 'SoundCloud Tags: (separate tags with spaces)',
'required' => false, 'required' => false,
'class' => 'input_text_area', 'class' => 'input_text_area',
'value' => Application_Model_Preference::GetSoundCloudTags(), 'value' => Application_Model_Preference::GetSoundCloudTags(),

View File

@ -2,7 +2,7 @@
<?php echo $this->element->getSubform('preferences_general') ?> <?php echo $this->element->getSubform('preferences_general') ?>
<h3 class="collapsible-header"><span class="arrow-icon"></span>SoundCloud settings</h3> <h3 class="collapsible-header"><span class="arrow-icon"></span>SoundCloud Settings</h3>
<div class="collapsible-content" id="soundcloud-settings" style="display: none;"> <div class="collapsible-content" id="soundcloud-settings" style="display: none;">
<?php echo $this->element->getSubform('preferences_soundcloud') ?> <?php echo $this->element->getSubform('preferences_soundcloud') ?>
</div> </div>