<?php

/**
* @version 2.7.11
* @package Joomla 1.6/1.7
* @subpackage DT Register
* @copyright Copyright (C) 2006 DTH Development
* @copyright contact dthdev@dthdevelopment.com
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
*/

include_once(JPATH_SITE."/administrator/components/com_dtregister/lib/defines.php");
include_once(JPATH_SITE."/administrator/components/com_dtregister/models/event.php");
include_once(JPATH_SITE."/administrator/components/com_dtregister/models/config.php");
include_once(JPATH_SITE."/administrator/components/com_dtregister/models/user.php");
include_once(JPATH_SITE."/administrator/components/com_dtregister/helpers/dtregister.php");

jimport('joomla.form.formfield');

class JFormFieldlocationlist extends JFormField {
 
	//The field class must know its own type through the variable $type.
	protected $type = 'locationlist';
 
	//public function getLabel() {
		// code that returns HTML that will be shown as the label
	//}
 
	public function getInput() {
		 $value = $this->value ;
		 $locationTable = DtrTable::getInstance('location','Table');
		 $options = DtHtml::options( $locationTable->optionslist(),'Select location');
		 return  JHTML::_('select.genericlist', $options, $this->name,'',"value","text",$value);
	}
}
?>