import v2.0.0.0_RC3 | 2012-07-01

https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

View File

@ -0,0 +1,30 @@
<?php
/*
* @copyright Copyright (C) 2005-2010 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkeys Ltd.
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
class Users_Form_SigninImage extends Zend_Form
{
public function init()
{
$image = new Monkeys_Form_Element_File('image');
$image->setLabel('')
->setRequired(true)
->setDescription('Only files of type jpg, jpeg, png and gif are allowed.<br />Maximum size is 2 MB.')
->addValidator('Count', false, 1)
->addValidator('Size', false, 2097152) // 2 MB
->addValidator('Extension', false, 'jpg, jpeg, png, gif')
->addFilter('StripNewlines'); // just a hack to circumvent ZF bug
translate('Only files of type jpg, jpeg, png and gif are allowed.<br />Maximum size is 2 MB.');
$this->addElements(array($image));
}
}