CC-2966: Remove minimum and maximum logo sizes - make them recommended instead

Fixed by:
1. change wording
2. attach custom filter to the logo upload form, the filter scales down the image
if it's larger than 600x600
This commit is contained in:
Yuchen Wang 2011-11-09 15:35:14 -05:00
parent 04bcc28b5e
commit 8f75bf1870
5 changed files with 52 additions and 14 deletions

View file

@ -1,5 +1,7 @@
<?php
require_once 'customfilters/ImageSize.php';
class Application_Form_SupportSettings extends Zend_Form
{
@ -99,12 +101,8 @@ class Application_Form_SupportSettings extends Zend_Form
->setRequired(false)
->setDecorators(array('File'))
->addValidator('Count', false, 1)
->addValidator('Extension', false, 'jpg,png,gif')
->addValidator('ImageSize', false, array(
'minwidth' => 200,
'minheight' => 200,
'maxwidth' => 600,
'maxheight' => 600));
->addValidator('Extension', false, 'jpg,jpeg,png,gif')
->addFilter('ImageSize');
$upload->setAttrib('accept', 'image/jpeg,image/gif,image/png,image/jpg');
$this->addElement($upload);