1: <?php
2: 3: 4: 5: 6: 7: 8: 9:
10:
11: if (!defined('XOOPS_ROOT_PATH')) exit();
12:
13: require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php";
14: require_once XOOPS_MODULE_PATH . "/legacy/class/Legacy_Validator.class.php";
15:
16: class Legacy_ImageAdminDeleteForm extends XCube_ActionForm
17: {
18: function getTokenName()
19: {
20: return "module.legacy.ImageAdminDeleteForm.TOKEN" . $this->get('image_id');
21: }
22:
23: function prepare()
24: {
25:
26:
27:
28: $this->mFormProperties['image_id'] =new XCube_IntProperty('image_id');
29:
30:
31:
32:
33: $this->mFieldProperties['image_id'] =new XCube_FieldProperty($this);
34: $this->mFieldProperties['image_id']->setDependsByArray(array('required'));
35: $this->mFieldProperties['image_id']->addMessage('required', _MD_LEGACY_ERROR_REQUIRED, _AD_LEGACY_LANG_IMAGE_ID);
36: }
37:
38: function load(&$obj)
39: {
40: $this->set('image_id', $obj->get('image_id'));
41: }
42:
43: function update(&$obj)
44: {
45: $obj->set('image_id', $this->get('image_id'));
46: }
47: }
48:
49: ?>
50: