1: <?php
2:
3: if (!defined('XOOPS_ROOT_PATH')) exit();
4:
5: require_once XOOPS_ROOT_PATH."/core/XCube_ActionForm.class.php";
6:
7: 8: 9: 10:
11: class Legacy_SmilesListForm extends XCube_ActionForm
12: {
13: 14: 15: 16:
17: function getTokenName()
18: {
19:
20:
21: if (xoops_getenv('REQUEST_METHOD') == 'POST') {
22: return "module.legacy.SmilesSettingsForm.TOKEN";
23: }
24: else {
25: return null;
26: }
27: }
28:
29: 30: 31: 32:
33: function getTokenErrorMessage()
34: {
35: return null;
36: }
37:
38: function prepare()
39: {
40:
41: $this->mFormProperties['code']=new XCube_StringArrayProperty('code');
42: $this->mFormProperties['emotion']=new XCube_StringArrayProperty('emotion');
43: $this->mFormProperties['display']=new XCube_BoolArrayProperty('display');
44: $this->mFormProperties['delete']=new XCube_BoolArrayProperty('delete');
45:
46: $this->mFormProperties['confirm'] =new XCube_BoolProperty('confirm');
47:
48: $this->mFieldProperties['code']=new XCube_FieldProperty($this);
49: $this->mFieldProperties['code']->setDependsByArray(array('required','maxlength'));
50: $this->mFieldProperties['code']->addMessage("required",_MD_LEGACY_ERROR_REQUIRED,_MD_LEGACY_LANG_CODE,"50");
51: $this->mFieldProperties['code']->addMessage("maxlength",_MD_LEGACY_ERROR_MAXLENGTH,_MD_LEGACY_LANG_CODE,"50");
52: $this->mFieldProperties['code']->addVar("maxlength",50);
53:
54: $this->mFieldProperties['emotion']=new XCube_FieldProperty($this);
55: $this->mFieldProperties['emotion']->setDependsByArray(array('required','maxlength'));
56: $this->mFieldProperties['emotion']->addMessage("required",_MD_LEGACY_ERROR_REQUIRED,_MD_LEGACY_LANG_EMOTION,"75");
57: $this->mFieldProperties['emotion']->addMessage("maxlength",_MD_LEGACY_ERROR_MAXLENGTH,_MD_LEGACY_LANG_EMOTION,"75");
58: $this->mFieldProperties['emotion']->addVar("maxlength",75);
59:
60: }
61: }
62:
63: ?>
64: