import v1.0.0-RC4 | 2009-05-20

This commit is contained in:
2019-07-17 22:08:50 +02:00
commit b484e522e8
2459 changed files with 1038434 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkeys Ltd.
* @since Textroller 0.9
* @package TextRoller
* @packager Keyboard Monkeys
*/
/**
* This class is never called. It's only a placeholder for form error messages wrapped in translate(),
* so that Poedit (or any other message catalogs editor) can catalog these messages for translation
*/
class ErrorMessages
{
private function _messages()
{
translate('Value is empty, but a non-empty value is required');
translate('\'%value%\' is not a valid email address in the basic format local-part@hostname');
translate('Captcha value is wrong');
translate('Password confirmation does not match');
}
}

View File

@ -0,0 +1,61 @@
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
class FeedbackForm extends Zend_Form
{
private $_baseWebDir;
public function __construct($options = null, $baseWebDir = null)
{
$this->_baseWebDir = $baseWebDir;
parent::__construct($options);
}
public function init()
{
$name = new Monkeys_Form_Element_Text('name');
translate('Enter your name');
$name->setLabel('Enter your name')
->setRequired(true);
$email = new Monkeys_Form_Element_Text('email');
translate('Enter your E-mail');
$email->setLabel('Enter your E-mail')
->addFilter('StringToLower')
->setRequired(true)
->addValidator('EmailAddress');
$feedback = new Monkeys_Form_Element_Textarea('feedback');
translate('Enter your questions or comments');
$feedback->setLabel('Enter your questions or comments')
->setRequired(true)
->setAttrib('cols', 60)
->setAttrib('rows', 4);
// ZF has some bugs when using mutators here, so I have to use the config array
translate('Please enter the text below');
$captcha = new Monkeys_Form_Element_Captcha('captcha', array(
'label' => 'Please enter the text below',
'captcha' => array(
'captcha' => 'Image',
'sessionClass' => get_class(Zend_Registry::get('appSession')),
'font' => APP_DIR . '/libs/Monkeys/fonts/Verdana.ttf',
'imgDir' => APP_DIR . '/webdir/captchas',
'imgUrl' => $this->_baseWebDir . '/captchas',
'wordLen' => 4,
'fontSize' => 30,
'timeout' => 300,
)
));
$this->addElements(array($name, $email, $feedback, $captcha));
}
}

View File

@ -0,0 +1,34 @@
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
class MessageUsersForm extends Zend_Form
{
public function init()
{
$subject = new Zend_Form_Element_Text('subject');
translate('Subject:');
$subject->setLabel('Subject:')
->setRequired(true);
$cc = new Zend_Form_Element_Text('cc');
translate('CC:');
$cc->setLabel('CC:');
$bodyPlain = new Zend_Form_Element_Textarea('bodyPlain');
translate('Body:');
$bodyPlain->setLabel('Body:');
$bodyHTML = new Zend_Form_Element_Textarea('bodyHTML');
$bodyHTML->setLabel('Body:');
$this->addElements(array($subject, $cc, $bodyPlain, $bodyHTML));
}
}

View File

@ -0,0 +1,28 @@
<?php
/*
* @copyright Copyright (C) 2005-2009 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD License
* @author Keyboard Monkey Ltd
* @since CommunityID 0.9
* @package CommunityID
* @packager Keyboard Monkeys
*/
class OpenIdLoginForm extends Zend_Form
{
public function init()
{
$openIdIdentity = new Zend_Form_Element_Text('openIdIdentity');
translate('Username');
$openIdIdentity->setLabel('Username')
->setRequired(true);
$password = new Zend_Form_Element_Password('password');
translate('Password');
$password->setLabel('Password')
->setRequired(true);
$this->addElements(array($openIdIdentity, $password));
}
}