<?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" style="background-color:<?php echo $this->settings->bg_color;?>;" >
<div style="margin:10px;">
<fieldset class="adminform">
	<div class="adodis-blog_buttons_save">
	<div class="adodis-blog_submit_buttons">
		<button type="submit" class="button validate" >
			<?php
				echo JText::_('JSAVE')
			?>
		</button>
		<button type="button" class="button" onclick="Joomla.submitbutton('blog.cancel')">
			<?php
				echo JText::_('JCANCEL')
			?>
		</button>
		</div>
		<a class="modal adodisblog_videoicon " title="<?php echo JText::_('COM_ADODISBLOG_ADD_VIDEO');?>" id="style234play" rel="{handler: 'iframe', size: {x: 600, y: 50}}" href="index.php?option=com_adodisblog&view=form&layout=video&tmpl=component"></a>

	</div>
	<div class="formelm">
		<?php
			echo $this->form->getLabel('title');
			echo $this->form->getInput('title');
		?>
	</div>
	<div class="formelm">
		<?php
			echo $this->form->getLabel('catid');
			echo $this->form->getInput('catid');
		?>
	</div>

	<div class="adodis-blog_buttons_save">

	</div>

<div class="clr"></div>
	<div class="formelm">
		<?php
			echo $this->form->getLabel('content');
		?>
			<div class="clr"></div>

			<div class="clr"></div>
		<?php echo $this->form->getInput('content'); ?>
	</div>
 </fieldset>
<?php
if($user->id==0 || $this->params->get('captcha_show_b', 1)) {
	if($user->id==0)
	echo $this->loadTemplate('anonymous');
	if( $this->params->get('captcha_show_b', 1) ) {
	?>
		<div class="adodis-blog_form_anonymous">
			<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>
		</div>
	<?php
	 }
}
if ( $this->item->params->get('access-edit') != '' ) { ?>
	<div class="adodis-blog_form_anonymous">
		<div class="formelm">
			<?php
				echo $this->form->getLabel('published');
				echo $this->form->getInput('published');
			?>
		</div>
		<div class="formelm">
			<?php
				echo $this->form->getLabel('access');
				echo $this->form->getInput('access');
			?>
		</div>
		<div class="formelm">
			<?php
				echo $this->form->getLabel('language');
				echo $this->form->getInput('language');
			?>
		</div>
		<div class="formelm">
			<?php
				echo $this->form->getLabel('ordering');
				echo $this->form->getInput('ordering');
			?>
		</div>
	</div>
<?php } ?>
</div>
</div>
