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_ImageListForm 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.ImageSettingsForm.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['nicename']=new XCube_StringArrayProperty('nicename');
42: $this->mFormProperties['weight']=new XCube_IntArrayProperty('weight');
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['nicename'] =new XCube_FieldProperty($this);
49: $this->mFieldProperties['nicename']->setDependsByArray(array('required'));
50: $this->mFieldProperties['nicename']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _MD_LEGACY_LANG_IMAGE_NICENAME);
51:
52: $this->mFieldProperties['weight'] =new XCube_FieldProperty($this);
53: $this->mFieldProperties['weight']->setDependsByArray(array('required'));
54: $this->mFieldProperties['weight']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_IMAGE_WEIGHT);
55:
56: }
57: }
58:
59: ?>
60: