Minahito
minah****@users*****
2006年 5月 19日 (金) 20:05:21 JST
Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php:1.1.2.1 --- /dev/null Fri May 19 20:05:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php Fri May 19 20:05:21 2006 @@ -0,0 +1,41 @@ +<?php + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; +require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php"; + +class LegacyRender_TplsetUploadForm extends XCube_ActionForm +{ + var $mOldFileName = null; + var $_mIsNew = null; + var $mFormFile = null; + + function getTokenName() + { + return "module.legacyRender.TplsetUploadForm.TOKEN"; + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['upload'] =& new XCube_FileProperty('upload'); + $this->mFormProperties['tplset_name'] =& new XCube_StringProperty('tplset_name'); + + // + // Set field properties + // + $this->mFieldProperties['upload'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['upload']->setDependsByArray(array('required')); + $this->mFieldProperties['upload']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_UPLOAD_FILE); + + $this->mFieldProperties['tplset_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['tplset_name']->setDependsByArray(array('maxlength')); + $this->mFieldProperties['tplset_name']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '50'); + $this->mFieldProperties['tplset_name']->addVar('maxlength', '50'); + } +} + +?>