CC-4090: Make code style PSR compliant

-removed all trailing whitespace in forms directory
-replace all tabs with 4 spaces
This commit is contained in:
Martin Konecny 2012-07-10 18:55:44 -04:00
parent d9cde230cd
commit 7ce4934cdc
25 changed files with 297 additions and 297 deletions

View file

@ -6,16 +6,16 @@ class Application_Form_AddShowRR extends Zend_Form_SubForm
public function init() public function init()
{ {
// Add record element // Add record element
$this->addElement('checkbox', 'add_show_record', array( $this->addElement('checkbox', 'add_show_record', array(
'label' => 'Record from Line In?', 'label' => 'Record from Line In?',
'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,
)); ));
} }
public function disable(){ public function disable(){

View file

@ -6,54 +6,54 @@ class Application_Form_AddShowRepeats extends Zend_Form_SubForm
public function init() public function init()
{ {
//Add type select //Add type select
$this->addElement('select', 'add_show_repeat_type', array( $this->addElement('select', 'add_show_repeat_type', array(
'required' => true, 'required' => true,
'label' => 'Repeat Type:', 'label' => 'Repeat Type:',
'class' => ' input_select', 'class' => ' input_select',
'multiOptions' => array( 'multiOptions' => array(
"0" => "weekly", "0" => "weekly",
"1" => "bi-weekly", "1" => "bi-weekly",
"2" => "monthly" "2" => "monthly"
), ),
)); ));
// Add days checkboxes // Add days checkboxes
$this->addElement( $this->addElement(
'multiCheckbox', 'multiCheckbox',
'add_show_day_check', 'add_show_day_check',
array( array(
'label' => 'Select Days:', 'label' => 'Select Days:',
'required' => false, 'required' => false,
'multiOptions' => array( 'multiOptions' => array(
"0" => "Sun", "0" => "Sun",
"1" => "Mon", "1" => "Mon",
"2" => "Tue", "2" => "Tue",
"3" => "Wed", "3" => "Wed",
"4" => "Thu", "4" => "Thu",
"5" => "Fri", "5" => "Fri",
"6" => "Sat", "6" => "Sat",
), ),
)); ));
// Add end date element // Add end date element
$this->addElement('text', 'add_show_end_date', array( $this->addElement('text', 'add_show_end_date', array(
'label' => 'Date End:', 'label' => 'Date End:',
'class' => 'input_text', 'class' => 'input_text',
'value' => date("Y-m-d"), 'value' => date("Y-m-d"),
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'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,
'checked' => true, 'checked' => true,
)); ));
} }
public function disable(){ public function disable(){

View file

@ -25,7 +25,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',

View file

@ -4,9 +4,9 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
{ {
public function init() public function init()
{ {
// retrieves the length limit for each char field // retrieves the length limit for each char field
// and store to assoc array // and store to assoc array
$maxLens = Application_Model_Show::getMaxLengths(); $maxLens = Application_Model_Show::getMaxLengths();
// Hidden element to indicate whether the show is new or // Hidden element to indicate whether the show is new or
// whether we are updating an existing show. // whether we are updating an existing show.
@ -27,8 +27,8 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'required' => true, 'required' => true,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array('NotEmpty'), 'validators' => array('NotEmpty'),
'value' => 'Untitled Show', 'value' => 'Untitled Show',
'validators' => array(array('StringLength', false, array(0, $maxLens['name']))) 'validators' => array(array('StringLength', false, array(0, $maxLens['name'])))
)); ));
// Add URL element // Add URL element
@ -46,16 +46,16 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
'class' => 'input_text', 'class' => 'input_text',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array(array('StringLength', false, array(0, $maxLens['genre']))) 'validators' => array(array('StringLength', false, array(0, $maxLens['genre'])))
)); ));
// Add the description element // Add the description element
$this->addElement('textarea', 'add_show_description', array( $this->addElement('textarea', 'add_show_description', array(
'label' => 'Description:', 'label' => 'Description:',
'required' => false, 'required' => false,
'class' => 'input_text_area', 'class' => 'input_text_area',
'validators' => array(array('StringLength', false, array(0, $maxLens['description']))) 'validators' => array(array('StringLength', false, array(0, $maxLens['description'])))
)); ));
$descText = $this->getElement('add_show_description'); $descText = $this->getElement('add_show_description');

View file

@ -10,21 +10,21 @@ class Application_Form_AddShowWho extends Zend_Form_SubForm
'label' => 'Search Users:', 'label' => 'Search Users:',
'class' => 'input_text ui-autocomplete-input', 'class' => 'input_text ui-autocomplete-input',
'required' => false 'required' => false
)); ));
$options = array(); $options = array();
$hosts = Application_Model_User::getHosts(); $hosts = Application_Model_User::getHosts();
foreach ($hosts as $host) { foreach ($hosts as $host) {
$options[$host['index']] = $host['label']; $options[$host['index']] = $host['label'];
} }
//Add hosts selection //Add hosts selection
$hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts'); $hosts = new Zend_Form_Element_MultiCheckbox('add_show_hosts');
$hosts->setLabel('DJs:') $hosts->setLabel('DJs:')
->setMultiOptions($options); ->setMultiOptions($options);
$this->addElement($hosts); $this->addElement($hosts);
} }
public function disable(){ public function disable(){

View file

@ -79,7 +79,7 @@ class Application_Form_AddUser extends Zend_Form
$select->setMultiOptions(array( $select->setMultiOptions(array(
"G" => "Guest", "G" => "Guest",
"H" => "DJ", "H" => "DJ",
"P" => "Program Manager", "P" => "Program Manager",
"A" => "Admin" "A" => "Admin"
)); ));
$select->setRequired(true); $select->setRequired(true);

View file

@ -7,21 +7,21 @@ class Application_Form_EditAudioMD extends Zend_Form
// Set the method for the display form to POST // Set the method for the display form to POST
$this->setMethod('post'); $this->setMethod('post');
// Add title field // Add title field
$this->addElement('text', 'track_title', array( $this->addElement('text', 'track_title', array(
'label' => 'Title:', 'label' => 'Title:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
)); ));
// Add artist field // Add artist field
$this->addElement('text', 'artist_name', array( $this->addElement('text', 'artist_name', array(
'label' => 'Creator:', 'label' => 'Creator:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
)); ));
// Add album field // Add album field
$this->addElement('text', 'album_title', array( $this->addElement('text', 'album_title', array(
'label' => 'Album:', 'label' => 'Album:',
'class' => 'input_text', 'class' => 'input_text',
@ -37,33 +37,33 @@ class Application_Form_EditAudioMD extends Zend_Form
'required' => true 'required' => true
)); ));
// Add genre field // Add genre field
$this->addElement('text', 'genre', array( $this->addElement('text', 'genre', array(
'label' => 'Genre:', 'label' => 'Genre:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add year field // Add year field
$this->addElement('text', 'year', array( $this->addElement('text', 'year', array(
'label' => 'Year:', 'label' => 'Year:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'validators' => array( 'validators' => array(
array('date', false, array('YYYY-MM-DD')), array('date', false, array('YYYY-MM-DD')),
array('date', false, array('YYYY-MM')), array('date', false, array('YYYY-MM')),
array('date', false, array('YYYY')) array('date', false, array('YYYY'))
) )
)); ));
// Add label field // Add label field
$this->addElement('text', 'label', array( $this->addElement('text', 'label', array(
'label' => 'Label:', 'label' => 'Label:',
'class' => 'input_text', 'class' => 'input_text',
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add composer field // Add composer field
$this->addElement('text', 'composer', array( $this->addElement('text', 'composer', array(
'label' => 'Composer:', 'label' => 'Composer:',
'class' => 'input_text', 'class' => 'input_text',
@ -77,7 +77,7 @@ class Application_Form_EditAudioMD extends Zend_Form
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add mood field // Add mood field
$this->addElement('text', 'mood', array( $this->addElement('text', 'mood', array(
'label' => 'Mood:', 'label' => 'Mood:',
'class' => 'input_text', 'class' => 'input_text',
@ -122,7 +122,7 @@ class Application_Form_EditAudioMD extends Zend_Form
'filters' => array('StringTrim') 'filters' => array('StringTrim')
)); ));
// Add the submit button // Add the submit button
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'ignore' => true, 'ignore' => true,
'class' => 'ui-button ui-state-default', 'class' => 'ui-button ui-state-default',
@ -132,7 +132,7 @@ class Application_Form_EditAudioMD extends Zend_Form
) )
)); ));
// Add the submit button // Add the submit button
$this->addElement('button', 'cancel', array( $this->addElement('button', 'cancel', array(
'ignore' => true, 'ignore' => true,
'class' => 'ui-button ui-state-default ui-button-text-only md-cancel', 'class' => 'ui-button ui-state-default ui-button-text-only md-cancel',

View file

@ -98,16 +98,16 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
private function getWeekStartDays() { private function getWeekStartDays() {
$days = array( $days = array(
'Sunday', 'Sunday',
'Monday', 'Monday',
'Tuesday', 'Tuesday',
'Wednesday', 'Wednesday',
'Thursday', 'Thursday',
'Friday', 'Friday',
'Saturday' 'Saturday'
); );
return $days; return $days;
} }
} }

View file

@ -7,14 +7,14 @@ class Application_Form_Login extends Zend_Form
{ {
global $CC_CONFIG; global $CC_CONFIG;
// Set the method for the display form to POST // Set the method for the display form to POST
$this->setMethod('post'); $this->setMethod('post');
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/login.phtml')) array('ViewScript', array('viewScript' => 'form/login.phtml'))
)); ));
// Add username element // Add username element
$this->addElement('text', 'username', array( $this->addElement('text', 'username', array(
'label' => 'Username:', 'label' => 'Username:',
'class' => 'input_text', 'class' => 'input_text',
@ -29,7 +29,7 @@ class Application_Form_Login extends Zend_Form
) )
)); ));
// Add password element // Add password element
$this->addElement('password', 'password', array( $this->addElement('password', 'password', array(
'label' => 'Password:', 'label' => 'Password:',
'class' => 'input_text', 'class' => 'input_text',
@ -53,7 +53,7 @@ class Application_Form_Login extends Zend_Form
$this->addRecaptcha(); $this->addRecaptcha();
} }
// Add the submit button // Add the submit button
$this->addElement('submit', 'submit', array( $this->addElement('submit', 'submit', array(
'ignore' => true, 'ignore' => true,
'label' => 'Login', 'label' => 'Login',

View file

@ -63,20 +63,20 @@ class Application_Form_RegisterAirtime extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// county list dropdown // county list dropdown
$this->addElement('select', 'Country', array( $this->addElement('select', 'Country', array(
'label' => 'Country:', 'label' => 'Country:',
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetStationCountry(), 'value' => Application_Model_Preference::GetStationCountry(),
'multiOptions' => $country_list, 'multiOptions' => $country_list,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// Station city // Station city
$this->addElement('text', 'City', array( $this->addElement('text', 'City', array(
'label' => 'City:', 'label' => 'City:',
'required' => false, 'required' => false,
@ -85,28 +85,28 @@ class Application_Form_RegisterAirtime extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// Station Description // Station Description
$description = new Zend_Form_Element_Textarea('Description'); $description = new Zend_Form_Element_Textarea('Description');
$description->class = 'input_text_area'; $description->class = 'input_text_area';
$description->setLabel('Station Description:') $description->setLabel('Station Description:')
->setRequired(false) ->setRequired(false)
->setValue(Application_Model_Preference::GetStationDescription()) ->setValue(Application_Model_Preference::GetStationDescription())
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
->setAttrib('ROWS','2') ->setAttrib('ROWS','2')
->setAttrib('COLS','58'); ->setAttrib('COLS','58');
$this->addElement($description); $this->addElement($description);
// Station Logo // Station Logo
$upload = new Zend_Form_Element_File('Logo'); $upload = new Zend_Form_Element_File('Logo');
$upload->setLabel('Station Logo:') $upload->setLabel('Station Logo:')
->setRequired(false) ->setRequired(false)
->setDecorators(array('File')) ->setDecorators(array('File'))
->addValidator('Count', false, 1) ->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,jpeg,png,gif') ->addValidator('Extension', false, 'jpg,jpeg,png,gif')
->addFilter('ImageSize'); ->addFilter('ImageSize');
$this->addElement($upload); $this->addElement($upload);
//enable support feedback //enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array( $this->addElement('checkbox', 'SupportFeedback', array(
@ -116,23 +116,23 @@ class Application_Form_RegisterAirtime extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// checkbox for publicise // checkbox for publicise
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise"); $checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
$checkboxPublicise->setLabel('Promote my station on Sourcefabric.org') $checkboxPublicise->setLabel('Promote my station on Sourcefabric.org')
->setRequired(false) ->setRequired(false)
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
->setValue(Application_Model_Preference::GetPublicise()); ->setValue(Application_Model_Preference::GetPublicise());
$this->addElement($checkboxPublicise); $this->addElement($checkboxPublicise);
// text area for sending detail // text area for sending detail
$this->addElement('textarea', 'SendInfo', array( $this->addElement('textarea', 'SendInfo', array(
'class' => 'sending_textarea', 'class' => 'sending_textarea',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'readonly' => true, 'readonly' => true,
'rows' => 5, 'rows' => 5,
'cols' => 61, 'cols' => 61,
'value' => Application_Model_Preference::GetSystemInfo(false, true), 'value' => Application_Model_Preference::GetSystemInfo(false, true),
'decorators' => array( 'decorators' => array(

View file

@ -91,7 +91,7 @@ class Application_Form_SoundcloudPreferences extends Zend_Form_SubForm
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
//SoundCloud default genre //SoundCloud default genre
$this->addElement('text', 'SoundCloudGenre', array( $this->addElement('text', 'SoundCloudGenre', array(

View file

@ -63,20 +63,20 @@ class Application_Form_SupportSettings extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// county list dropdown // county list dropdown
$this->addElement('select', 'Country', array( $this->addElement('select', 'Country', array(
'label' => 'Country:', 'label' => 'Country:',
'required' => false, 'required' => false,
'value' => Application_Model_Preference::GetStationCountry(), 'value' => Application_Model_Preference::GetStationCountry(),
'multiOptions' => $country_list, 'multiOptions' => $country_list,
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// Station city // Station city
$this->addElement('text', 'City', array( $this->addElement('text', 'City', array(
'label' => 'City:', 'label' => 'City:',
'required' => false, 'required' => false,
@ -85,31 +85,31 @@ class Application_Form_SupportSettings extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// Station Description // Station Description
$description = new Zend_Form_Element_Textarea('Description'); $description = new Zend_Form_Element_Textarea('Description');
$description->class = 'input_text_area'; $description->class = 'input_text_area';
$description->setLabel('Station Description:') $description->setLabel('Station Description:')
->setRequired(false) ->setRequired(false)
->setValue(Application_Model_Preference::GetStationDescription()) ->setValue(Application_Model_Preference::GetStationDescription())
->setDecorators(array('ViewHelper')) ->setDecorators(array('ViewHelper'))
->setAttrib('ROWS','2') ->setAttrib('ROWS','2')
->setAttrib('COLS','58'); ->setAttrib('COLS','58');
$this->addElement($description); $this->addElement($description);
// Station Logo // Station Logo
$upload = new Zend_Form_Element_File('Logo'); $upload = new Zend_Form_Element_File('Logo');
$upload->setLabel('Station Logo:') $upload->setLabel('Station Logo:')
->setRequired(false) ->setRequired(false)
->setDecorators(array('File')) ->setDecorators(array('File'))
->addValidator('Count', false, 1) ->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,jpeg,png,gif') ->addValidator('Extension', false, 'jpg,jpeg,png,gif')
->addFilter('ImageSize'); ->addFilter('ImageSize');
$upload->setAttrib('accept', 'image/*'); $upload->setAttrib('accept', 'image/*');
$this->addElement($upload); $this->addElement($upload);
if(!$isSass){ if(!$isSass){
//enable support feedback //enable support feedback
$this->addElement('checkbox', 'SupportFeedback', array( $this->addElement('checkbox', 'SupportFeedback', array(
'label' => 'Send support feedback', 'label' => 'Send support feedback',
@ -118,9 +118,9 @@ class Application_Form_SupportSettings extends Zend_Form
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'
) )
)); ));
// checkbox for publicise // checkbox for publicise
$checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise"); $checkboxPublicise = new Zend_Form_Element_Checkbox("Publicise");
$checkboxPublicise->setLabel('Promote my station on Sourcefabric.org') $checkboxPublicise->setLabel('Promote my station on Sourcefabric.org')
->setRequired(false) ->setRequired(false)
@ -131,14 +131,14 @@ class Application_Form_SupportSettings extends Zend_Form
} }
$this->addElement($checkboxPublicise); $this->addElement($checkboxPublicise);
// text area for sending detail // text area for sending detail
$this->addElement('textarea', 'SendInfo', array( $this->addElement('textarea', 'SendInfo', array(
'class' => 'sending_textarea', 'class' => 'sending_textarea',
'required' => false, 'required' => false,
'filters' => array('StringTrim'), 'filters' => array('StringTrim'),
'readonly' => true, 'readonly' => true,
'cols' => 61, 'cols' => 61,
'rows' => 5, 'rows' => 5,
'value' => Application_Model_Preference::GetSystemInfo(false, true), 'value' => Application_Model_Preference::GetSystemInfo(false, true),
'decorators' => array( 'decorators' => array(
'ViewHelper' 'ViewHelper'