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()
{
// Add record element
$this->addElement('checkbox', 'add_show_record', array(
$this->addElement('checkbox', 'add_show_record', array(
'label' => 'Record from Line In?',
'required' => false,
));
));
// Add record element
$this->addElement('checkbox', 'add_show_rebroadcast', array(
$this->addElement('checkbox', 'add_show_rebroadcast', array(
'label' => 'Rebroadcast?',
'required' => false,
));
));
}
public function disable(){

View file

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

View file

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

View file

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

View file

@ -79,7 +79,7 @@ class Application_Form_AddUser extends Zend_Form
$select->setMultiOptions(array(
"G" => "Guest",
"H" => "DJ",
"P" => "Program Manager",
"P" => "Program Manager",
"A" => "Admin"
));
$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
$this->setMethod('post');
// Add title field
// Add title field
$this->addElement('text', 'track_title', array(
'label' => 'Title:',
'class' => 'input_text',
'filters' => array('StringTrim'),
));
// Add artist field
// Add artist field
$this->addElement('text', 'artist_name', array(
'label' => 'Creator:',
'class' => 'input_text',
'filters' => array('StringTrim'),
));
// Add album field
// Add album field
$this->addElement('text', 'album_title', array(
'label' => 'Album:',
'class' => 'input_text',
@ -37,33 +37,33 @@ class Application_Form_EditAudioMD extends Zend_Form
'required' => true
));
// Add genre field
// Add genre field
$this->addElement('text', 'genre', array(
'label' => 'Genre:',
'class' => 'input_text',
'filters' => array('StringTrim')
));
// Add year field
// Add year field
$this->addElement('text', 'year', array(
'label' => 'Year:',
'class' => 'input_text',
'filters' => array('StringTrim'),
'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'))
)
array('date', false, array('YYYY'))
)
));
// Add label field
// Add label field
$this->addElement('text', 'label', array(
'label' => 'Label:',
'class' => 'input_text',
'filters' => array('StringTrim')
));
// Add composer field
// Add composer field
$this->addElement('text', 'composer', array(
'label' => 'Composer:',
'class' => 'input_text',
@ -77,7 +77,7 @@ class Application_Form_EditAudioMD extends Zend_Form
'filters' => array('StringTrim')
));
// Add mood field
// Add mood field
$this->addElement('text', 'mood', array(
'label' => 'Mood:',
'class' => 'input_text',
@ -122,7 +122,7 @@ class Application_Form_EditAudioMD extends Zend_Form
'filters' => array('StringTrim')
));
// Add the submit button
// Add the submit button
$this->addElement('submit', 'submit', array(
'ignore' => true,
'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(
'ignore' => true,
'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() {
$days = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
);
return $days;
$days = array(
'Sunday',
'Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday'
);
return $days;
}
}

View file

@ -7,14 +7,14 @@ class Application_Form_Login extends Zend_Form
{
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->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/login.phtml'))
));
// Add username element
// Add username element
$this->addElement('text', 'username', array(
'label' => 'Username:',
'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(
'label' => 'Password:',
'class' => 'input_text',
@ -53,7 +53,7 @@ class Application_Form_Login extends Zend_Form
$this->addRecaptcha();
}
// Add the submit button
// Add the submit button
$this->addElement('submit', 'submit', array(
'ignore' => true,
'label' => 'Login',

View file

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

View file

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

View file

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