<?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 TplsetSelectForm extends XCube_ActionForm
{
	function getTokenName()
	{
		return "module.legacyRender.TemplatesetSelectForm.TOKEN";
	}

	function prepare()
	{
		//
		// Set form properties
		//
		$this->mFormProperties['tplset_name'] =& new XCube_StringProperty('tplset_name');
	}

	function validateTplset_name()
	{
		$handler =& xoops_getmodulehandler('tplset');
		if ($handler->getCount(new Criteria('tplset_name', $this->get('tplset_name'))) == 0) {
			$this->addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NO_EXIST);
		}
	}
}

?>
