<?php
/**
 * @package     VP Advanced User
 * @subpackage  Module - VP Advanced User
 * @author      Abhishek Das <info@virtueplanet.com>
 * @copyright   Copyright (C) 2012-2019 VirtuePlanet Services LLP. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 * @link        https://www.virtueplanet.com
 */

defined('_JEXEC') or die;

JHtml::_('behavior.keepalive');
JHtml::_('behavior.formvalidator');
JHtml::_('vpadvanceduser.loadjs');

JHtml::_('vpadvanceduser.stylesheet', 'com_vpadvanceduser/general.css', array(), true);
?>
<div class="vp-wrapper vp-login-module<?php echo $moduleclass_sfx ?>">
	<?php if($display == 3) : ?>
		<?php if($show_tabs) : ?>
			<div class="vp-tabs vp-clearfix">
				<ul>
					<li class="vp-active">
						<a href="#vp-login-mod-content-<?php echo $module->id ?>" data-tabfor="login"><?php echo JText::_('JLOGIN') ?></a>
					</li>
					<li>
						<a href="#vp-registration-mod-content-<?php echo $module->id ?>" data-tabfor="registration"><?php echo JText::_('JREGISTER') ?></a>
					</li>
				</ul>
			</div>
			<div class="vp-clearfix"></div>
		<?php endif ?>
		<div class="vp-tab-contents">
			<?php if(!$reg_inprocess) : ?>
				<div id="vp-login-mod-content-<?php echo $module->id ?>" class="vp-tab-content">
					<?php require JModuleHelper::getLayoutPath('mod_vpadvanceduser', $params->get('layout', 'default') . '_login'); ?>
				</div>
			<?php endif ?>
			<?php if($user_params->get('allowUserRegistration')) : ?>
				<?php $class = $reg_inprocess ? '' : ' vp-hide'; ?>
				<div id="vp-registration-mod-content-<?php echo $module->id ?>" class="vp-tab-content<?php echo $class ?>">
					<?php require JModuleHelper::getLayoutPath('mod_vpadvanceduser', $params->get('layout', 'default') . '_registration'); ?>
				</div>
			<?php endif ?>
		</div>
	<?php elseif($display == 1) : ?>
		<?php require JModuleHelper::getLayoutPath('mod_vpadvanceduser', $params->get('layout', 'default') . '_login'); ?>
	<?php else : ?>
		<?php require JModuleHelper::getLayoutPath('mod_vpadvanceduser', $params->get('layout', 'default') . '_registration'); ?>
	<?php endif ?>
</div>