<?php

defined ( '_JEXEC' ) or die ( 'Restricted access' );
/*
 * @component Calc Builder 
 * @copyright Copyright (C) January 2017. 
 * @license GPL 3.0 
 * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
 * See the GNU General Public License for more details. 
 * See <http://www.gnu.org/licenses/>. 
 * More info www.moonsoft.es 
 * gestion@moonsoft.es
 */
$document = JFactory::getDocument ();
// $document->addStyleSheet(JURI::base().'components/com_calcbuilder/assets/css/default.css','text/css','screen');
// $document->addStyleSheet(JURI::base().'components/com_calcbuilder/assets/css/ui-lightness/jquery-ui-1.8.17.custom.css','text/css','screen');
$css = $this->__getCSS ();
foreach ( $css as $style ) {
	$document->addStyleSheet ( $style );
}
$js = $this->__getJS ();
foreach ( $js as $jscript ) {
	?><script src="<?php echo $jscript;?>"></script><?php
}
?>
<form action="index.php" method="post" name="adminForm" id="adminForm">
	<div class="row-fluid">
		<div class="form-horizontal cb_table_wrapper span12">
			<div class="control-group">
				<label class="control-label"></label>
				<div class="controls">
					<a href="#exitlayout_modal_info" role="button" class="btn btn-info"
						data-toggle="modal" style="margin-left: 10px;">
					<?php echo JText::_( 'SECTION_EXIT_HELP_TITLE' ); ?>
				</a>
					<div id="exitlayout_modal_info" class="modal hide fade"
						tabindex="-1" role="dialog" aria-hidden="true">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal"
								aria-hidden="true">&times;</button>
							<h3><?php echo JText::_( 'SECTION_EXIT_HELP_TITLE' ); ?></h3>
						</div>
						<div class="modal-body">
							<p><?php echo JText::_( 'SECTION_EXIT_HELP' ); ?></p>
						</div>
						<div class="modal-footer">
							<a data-dismiss="modal" class="btn">Close</a>
						</div>
					</div>
				</div>
			</div>
			<div class="clearfix"></div>
			<div class="span3">
				<blockquote><?php echo JText::_('FIELDS');?></blockquote>
				<ul class="unstyled">
				<?php foreach ($this->allfields as $field){ ?>
				<li><?php echo $field->var; ?> (<?php echo $field->name; ?>)</li>
				<?php } ?>
			</ul>
			</div>
			<div class="span8">
		<?php
		$editor = JFactory::getEditor ();
		echo $editor->display ( 'exitlayout', $this->item ['exitlayout'], '800', '600', '100', '6' );
		?> 
		</div>
		</div>
	</div>
	<input type="hidden" name="id" value="<?php echo $this->item['id']; ?>" />
	<input type="hidden" name="idutility"
		value="<?php echo $this->item['id']; ?>" /> <input type="hidden"
		name="cid[]" value="<?php echo $this->item['id']; ?>" /> <input
		type="hidden" name="option" value="com_calcbuilder" /> <input
		type="hidden" name="task" value="storeLayout" /> <input type="hidden"
		name="boxchecked" value="0" /> <input type="hidden" name="controller"
		value="utility" /> <input type="hidden" name="check" value="post" /> <input
		type="hidden" name="class" value="0" />
<?php echo JHtml::_( 'form.token' ); ?>
</form>

