<?php

if (!defined('XOOPS_ROOT_PATH')) exit();

require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";

/**
 * This class is generated by makeActionForm tool.
 */
class TplsetEditForm extends XCube_ActionForm
{
	function prepare()
	{
		//
		// Set form properties
		//
		$this->mFormProperties['tplset_id'] =& new XCube_IntProperty('tplset_id');
		$this->mFormProperties['tplset_desc'] =& new XCube_StringProperty('tplset_desc');
		$this->mFormProperties['tplset_credits'] =& new XCube_TextProperty('tplset_credits');

		//
		// Set field properties
		//
		$this->mFieldProperties['tplset_id'] =& new XCube_FieldProperty($this);
		$this->mFieldProperties['tplset_id']->setDependsByArray(array('required'));
		$this->mFieldProperties['tplset_id']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_ID);

		$this->mFieldProperties['tplset_desc'] =& new XCube_FieldProperty($this);
		$this->mFieldProperties['tplset_desc']->setDependsByArray(array('maxlength'));
		$this->mFieldProperties['tplset_desc']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '255');
		$this->mFieldProperties['tplset_desc']->addVar('maxlength', 255);
	}
	function getTokenName()
	{
		return "module.legacyRender.TplsetEditForm.TOKEN";
	}

	function load(&$obj)
	{
		$this->setVar('tplset_id', $obj->get('tplset_id'));
		$this->setVar('tplset_desc', $obj->get('tplset_desc'));
		$this->setVar('tplset_credits', $obj->get('tplset_credits'));
	}

	function update(&$obj)
	{
		$obj->setVar('tplset_id', $this->get('tplset_id'));
		$obj->setVar('tplset_desc', $this->get('tplset_desc'));
		$obj->setVar('tplset_credits', $this->get('tplset_credits'));
	}
}

?>
