<?php
	FNTH_class( "Checkbox" );

	class FrontendCheckbox extends FNTHCheckbox {
		protected $bShowTitle = false;
		protected $sTitleAlignation = "right";
		protected $sTitle = "";

		public function __construct( $id = "FrontendCheckbox" , $parent = null ) {
			$this->addMediaDirectory( $GLOBALS["site_root"] , $GLOBALS["site_www"] , "design/rp/","widgets/");
			parent::__construct( $id , $parent );
			$this->setAttribute( "class" , "FrontendCheckbox" );
			$this->setParam("language",$GLOBALS["language"]);
		}

		public function setShowTitle( $v ) { $this->bShowTitle = $v; }
		public function setTitle( $v ) { $this->sTitle = $v; }
		public function setTitleAlignation( $v ) { $this->sTitleAlignation = $v; }

		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "bShowTitle" , $this->bShowTitle );
			$this->setParam( "sTitleAlignation" , $this->sTitleAlignation );
			$this->setParam( "title" , $this->sTitle );
			return parent::render();
		}
	}

?>
