NobuNobu
nobun****@users*****
2006年 2月 4日 (土) 16:52:47 JST
Index: xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php diff -u xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.2 xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.3 --- xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php:1.1.2.2 Thu Feb 2 17:49:51 2006 +++ xoops2jp/html/modules/user/forms/AbstractUserEditForm.class.php Sat Feb 4 16:52:47 2006 @@ -58,7 +58,7 @@ function validateTimezone_offset() { - $handler =& xoops_getmodulehandler('timezone'); + $handler =& xoops_gethandler('timezone'); $obj =& $handler->get($this->get('timezone_offset')); if (!is_object($obj)) { $this->addErrorMessage(_MD_USER_ERROR_TIMEZONE); Index: xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php diff -u xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.2 xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.3 --- xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php:1.1.2.2 Thu Feb 2 17:50:52 2006 +++ xoops2jp/html/modules/user/forms/UserRegisterEditForm.class.php Sat Feb 4 16:52:47 2006 @@ -78,5 +78,23 @@ $obj->set('agree', $this->get('agree')); } } +class UserRegisterAgreeEditForm extends UserRegisterEditForm +{ + function prepare($userConfig) + { + parent::prepare($userConfig); + + // set properties + $this->mFormProperties['agree']=new XCube_IntProperty('agree'); + + // set fields + $this->mFieldProperties['agree']=new XCube_FieldProperty($this); + $this->mFieldProperties['agree']->setDependsByArray(array('required','intRange')); + $this->mFieldProperties['agree']->addMessage("required",_US_UNEEDAGREE); + $this->mFieldProperties['agree']->addMessage("intRange",_US_UNEEDAGREE); + $this->mFieldProperties['agree']->addVar("min",1); + $this->mFieldProperties['agree']->addVar("max",1); + } +} ?>