<?php

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

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

/**
 * This class is generated by makeActionForm tool.
 * @auchor makeActionForm
 */
class User_GroupEditForm extends XCube_ActionForm 
{
	function getTokenName()
	{
		return "module.user.GroupEditForm.TOKEN";
	}

	function prepare()
	{
		// set properties
		$this->mFormProperties['groupid']=new XCube_IntProperty('groupid');
		$this->mFormProperties['name']=new XCube_StringProperty('name');
		$this->mFormProperties['description']=new XCube_TextProperty('description');

		// set fields
		$this->mFieldProperties['name']=new XCube_FieldProperty($this);
		$this->mFieldProperties['name']->setDependsByArray(array('required','maxlength'));
		$this->mFieldProperties['name']->addMessage("required",_AD_USER_ERROR_REQUIRED,_AD_USER_LANG_NAME,"100");
		$this->mFieldProperties['name']->addMessage("maxlength",_AD_USER_ERROR_MAXLENGTH,_AD_USER_LANG_NAME,"100");
		$this->mFieldProperties['name']->addVar("maxlength",100);

	}

	function load(&$group)
	{
		$this->set('groupid', $group->get('groupid'));
		$this->set('name', $group->get('name'));
		$this->set('description', $group->get('description'));
	}

	function update(&$group)
	{
		$group->setVar('groupid', $this->get('groupid'));
		$group->setVar('name', $this->get('name'));
		$group->setVar('description', $this->get('description'));
	}
}

?>
