<?php
	FNTH_class( "Textarea" );

	class AdminTextarea extends FNTHTextarea {
		protected $bShowTitle = false;

		public function setShowTitle( $v ) { $this->bShowTitle = $v; }

		public function modifyGetPost( &$g, &$p ) {
			$id = $this->getId();
			if (isset( $this->aG[$id] )) $this->setValue( $this->aG[$id] );
			if (isset( $this->aP[$id] )) $this->setValue( $this->aP[$id] );
			parent::modifyGetPost( $g , $p );
		}
		public function __construct( $id = "AdminTextarea" , $parent = null ) {
			$this->addMediaDirectory( $GLOBALS["site_root"] , $GLOBALS["site_www"] , "design/rp/","widgets/");
			parent::__construct( $id , $parent );
			$this->setAttribute( "class" , "AdminTextarea" );
			$this->setParam("language",$GLOBALS["language"]);
		}
		
		public function render() {
			if ($this->sRendered) return $this->sRendered;
			$this->setParam( "bShowTitle" , $this->bShowTitle );
			return parent::render();
		}
	}
?>
