<?php
/**
 * Adodis Blog package
 * @author J-Extension <contact@jextn.com>
 * @link http://www.jextn.com
 * @copyright (C) 2012 - 2013 J-Extension
 * @license GNU/GPL, see LICENSE.php for full license.
**/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

JHtml::_('behavior.keepalive');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.calendar');
JHtml::_('behavior.formvalidation');

$app	= JFactory::getApplication();
$user	= JFactory::getUser();

require_once (JPATH_COMPONENT.DS.'captcha'.DS.'captcha.php');
?>
<div class="adodis-blog_bgitem_container adodis-comment_field_container" style="background-color:<?php echo $this->settings->bg_color;?>;" >
	<fieldset class="adminform">
		<?php
			if($user->id==0)
				echo $this->loadTemplate('anonymous');
		?>
		<div class="formelm">
			<?php
				echo $this->form->getLabel('comment');
				echo $this->form->getInput('comment');
			?>
		</div>
		<?php
		if( $this->params->get('captcha_show_c', 1) ) { ?>
			<div class="formelm">
				<label title="" class="hasTip" for="jform_captcha" id="jform_captcha-lbl">
				<?php echo JText::_('COM_ADODISBLOG_CAPTCHA')." :"; echo '<span style="color:#CC0000;">*</span>';?>
				</label>
				<?php
					echo(AutarticaptchaHelper::generateInputTags());
					echo(AutarticaptchaHelper::generateImgTags(JURI::Base()."components/com_adodisblog/captcha/"));
					echo(AutarticaptchaHelper::generateHiddenTags());
				?>
			</div>
		<?php } ?>
		<div class="formelm adodis-blog_margin0">
			<label></label>
			<button type="submit" class="button validate" >
				<?php echo JText::_('ADODIS_BLOG_COMMENT') ?>
			</button>
		</div>
	</fieldset>
</div>