- Code: Select all
--- ocs-2.0.0-1/classes/registration/form/RegistrationForm.inc.php.regvalidation 2007-04-10 13:45:08.000000000 -0700
+++ ocs-2.0.0-1/classes/registration/form/RegistrationForm.inc.php 2008-03-04 01:28:26.016780000 -0800
@@ -68,4 +68,5 @@
// Notify email flag is valid value
$this->addCheck(new FormValidatorInSet($this, 'notifyEmail', 'optional', 'manager.registration.form.notifyEmailValid', array('1')));
+ $this->addCheck(new FormValidatorLength($this, 'specialRequests', 'optional', 'manager.registration.form.specialRequestsTruncated', '<=', 255));
}
@@ -90,4 +91,6 @@
$templateMgr->assign('registrationTypes', $registrationTypes);
$templateMgr->assign('helpTopicId', 'schedConf.managementPages.registration');
+
+ $this->setData('specialRequests', String::substr($this->getData('specialRequests'), 0, 255));
parent::display();
--- ocs-2.0.0-1/classes/registration/form/UserRegistrationForm.inc.php.regvalidation 2007-05-10 12:38:26.000000000 -0700
+++ ocs-2.0.0-1/classes/registration/form/UserRegistrationForm.inc.php 2008-03-04 01:21:04.023542000 -0800
@@ -35,5 +35,5 @@
$this->addCheck(new FormValidator($this, 'registrationTypeId', 'required', 'manager.registration.form.typeIdRequired'));
$this->addCheck(new FormValidatorCustom($this, 'registrationTypeId', 'required', 'manager.registration.form.typeIdValid', create_function('$registrationTypeId, $schedConfId', '$registrationTypeDao = &DAORegistry::getDAO(\'RegistrationTypeDAO\'); return $registrationTypeDao->openRegistrationTypeExistsByTypeId($registrationTypeId, $schedConfId);'), array($schedConf->getSchedConfId())));
-
+ $this->addCheck(new FormValidatorLength($this, 'specialRequests', 'optional', 'manager.registration.form.specialRequestsTruncated', '<=', 255));
import('captcha.CaptchaManager');
$captchaManager =& new CaptchaManager();
@@ -121,4 +121,5 @@
$templateMgr->assign('schedConfSettings', $schedConf->getSettings());
$templateMgr->assign_by_ref('user', $user);
+ $this->setData('specialRequests', String::substr($this->getData('specialRequests'), 0, 255));
parent::display();
}
--- ocs-2.0.0-1/locale/en_US/locale.xml.regvalidation 2008-03-03 15:54:10.000000000 -0800
+++ ocs-2.0.0-1/locale/en_US/locale.xml 2008-03-04 01:31:37.032504000 -0800
@@ -1498,4 +1498,5 @@
<message key="manager.registration.form.notifyEmailValid">Please use the checkbox provided.</message>
<message key="manager.registration.form.registrationContactRequired">In order to send the user a notification email, the registration contact name and email address must be specified in the Conference Setup.</message>
+ <message key="manager.registration.form.specialRequestsTruncated"><![CDATA[The Special Requests field is too long, and has been truncated. If this is OK, please submit this form again.]]></message>
<message key="manager.registration.form.userId">User</message>
<message key="manager.registration.form.typeId">Registration type</message>
