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

// No direct access
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
$params = $this->form->getFieldsets('params');
?>

<script type="text/javascript">
	Joomla.submitbutton = function(task)
	{
		if (task == 'order.cancel' || document.formvalidator.isValid(document.id('category-form'))) {
			Joomla.submitform(task, document.getElementById('category-form'));
		} else {
			alert('<?php echo $this->escape(JText::_('JGLOBAL_VALIDATION_FORM_FAILED'));?>');
		}

	}
</script>

<form action="<?php echo JRoute::_('index.php?option=com_jegroupbuy&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="category-form" class="form-validate">
	<fieldset class="adminform">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#orderdetails" data-toggle="tab"><?php echo empty($this->item->id) ? JText::_('JE_ORDER_DETAILS') : JText::sprintf('JE_ORDER_DETAILS', $this->item->id); ?></a></li>
		</ul>
		<div class="tab-content">
			<div class="tab-pane active" id="orderdetails">
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('p_id'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('p_id'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('user_id'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('user_id'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('method'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('method'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('transaction_id'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('transaction_id'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('status'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('status'); ?></div>
				</div>
				<div class="control-group">
					<div class="control-label"><?php echo $this->form->getLabel('id'); ?></div>
					<div class="controls"><?php echo $this->form->getInput('id'); ?></div>
				</div>
			</div>
		</div>
	</fieldset>
	<div>
		<input type="hidden" name="task" value="order.edit" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>

<div class="copyright" align="center">
	<?php require_once( JPATH_COMPONENT . DS . 'copyright' . DS . 'copyright.php' ); ?>
</div>