Moved the Station Logo field to GeneralPreferences, and stopped using
AJAX on the general prefs form
This commit is contained in:
parent
4ba4559f01
commit
f9bf71a349
10 changed files with 50 additions and 62 deletions
|
@ -1,11 +1,14 @@
|
|||
<?php
|
||||
|
||||
require_once 'customfilters/ImageSize.php';
|
||||
|
||||
class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
||||
{
|
||||
|
||||
public function init()
|
||||
{
|
||||
$maxLens = Application_Model_Show::getMaxLengths();
|
||||
$this->setEnctype(Zend_Form::ENCTYPE_MULTIPART);
|
||||
|
||||
$notEmptyValidator = Application_Form_Helper_ValidationTypes::overrideNotEmptyValidator();
|
||||
$rangeValidator = Application_Form_Helper_ValidationTypes::overrideBetweenValidator(0, 59.9);
|
||||
|
@ -34,6 +37,18 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
|
|||
$stationDescription->setAttrib('rows', 4);
|
||||
$this->addElement($stationDescription);
|
||||
|
||||
// Station Logo
|
||||
$stationLogoUpload = new Zend_Form_Element_File('stationLogo');
|
||||
$stationLogoUpload->setLabel(_('Station Logo:'))
|
||||
->setDescription(_("Note: Anything larger than 600x600 will be resized."))
|
||||
->setRequired(false)
|
||||
->addValidator('Count', false, 1)
|
||||
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
|
||||
->setMaxFileSize(1000000)
|
||||
->addFilter('ImageSize');
|
||||
$stationLogoUpload->setAttrib('accept', 'image/*');
|
||||
$this->addElement($stationLogoUpload);
|
||||
|
||||
//Default station crossfade duration
|
||||
$this->addElement('text', 'stationDefaultCrossfadeDuration', array(
|
||||
'class' => 'input_text',
|
||||
|
|
|
@ -7,9 +7,6 @@ class Application_Form_Preferences extends Zend_Form
|
|||
{
|
||||
$baseUrl = Application_Common_OsPath::getBaseDir();
|
||||
|
||||
$this->setMethod('post');
|
||||
|
||||
|
||||
$this->setDecorators(array(
|
||||
array('ViewScript', array('viewScript' => 'form/preferences.phtml'))
|
||||
));
|
||||
|
@ -31,5 +28,12 @@ class Application_Form_Preferences extends Zend_Form
|
|||
$soundcloud_pref = new Application_Form_SoundcloudPreferences();
|
||||
$this->addSubForm($soundcloud_pref, 'preferences_soundcloud');
|
||||
|
||||
$submit = new Zend_Form_Element_Submit('submit');
|
||||
$submit->setLabel(_('Save'));
|
||||
//$submit->removeDecorator('Label');
|
||||
$submit->setAttribs(array('class'=>'btn right-floated'));
|
||||
$submit->removeDecorator('DtDdWrapper');
|
||||
|
||||
$this->addElement($submit);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
require_once 'customfilters/ImageSize.php';
|
||||
|
||||
class Application_Form_SupportSettings extends Zend_Form
|
||||
{
|
||||
|
||||
|
@ -96,17 +94,6 @@ class Application_Form_SupportSettings extends Zend_Form
|
|||
->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);
|
||||
|
||||
//enable support feedback
|
||||
$this->addElement('checkbox', 'SupportFeedback', array(
|
||||
'label' => _('Send support feedback'),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue