1: <?php
2: 3: 4: 5:
6:
7: if (!defined('XOOPS_ROOT_PATH')) exit();
8:
9: require_once XOOPS_ROOT_PATH . "/core/XCube_ActionForm.class.php";
10: require_once XOOPS_MODULE_PATH . "/legacy/class/Legacy_Validator.class.php";
11:
12: class LegacyRender_TplsetEditForm extends XCube_ActionForm
13: {
14: function getTokenName()
15: {
16: return "module.legacyRender.TplsetEditForm.TOKEN" . $this->get('tplset_id');
17: }
18:
19: function prepare()
20: {
21:
22:
23:
24: $this->mFormProperties['tplset_id'] =new XCube_IntProperty('tplset_id');
25: $this->mFormProperties['tplset_desc'] =new XCube_StringProperty('tplset_desc');
26: $this->mFormProperties['tplset_credits'] =new XCube_TextProperty('tplset_credits');
27:
28:
29:
30:
31: $this->mFieldProperties['tplset_id'] =new XCube_FieldProperty($this);
32: $this->mFieldProperties['tplset_id']->setDependsByArray(array('required'));
33: $this->mFieldProperties['tplset_id']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_ID);
34:
35: $this->mFieldProperties['tplset_desc'] =new XCube_FieldProperty($this);
36: $this->mFieldProperties['tplset_desc']->setDependsByArray(array('maxlength'));
37: $this->mFieldProperties['tplset_desc']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '255');
38: $this->mFieldProperties['tplset_desc']->addVar('maxlength', 255);
39: }
40:
41: function load(&$obj)
42: {
43: $this->set('tplset_id', $obj->get('tplset_id'));
44: $this->set('tplset_desc', $obj->get('tplset_desc'));
45: $this->set('tplset_credits', $obj->get('tplset_credits'));
46: }
47:
48: function update(&$obj)
49: {
50: $obj->set('tplset_id', $this->get('tplset_id'));
51: $obj->set('tplset_desc', $this->get('tplset_desc'));
52: $obj->set('tplset_credits', $this->get('tplset_credits'));
53: }
54: }
55:
56: ?>
57: