<?php
/**
 * @version		$Id: default.php 21322 2011-05-11 01:10:29Z dextercowley $
 * @package		Joomla.Site
 * @subpackage	mod_login
 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;
JHtml::_('behavior.keepalive');
?>

<?php if ($type == 'logout') : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form">
<?php if ($params->get('greeting')) : ?>
	<div class="login-greeting">
	<?php if($params->get('name') == 0) : {
		echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('name'));
	} else : {
		echo JText::sprintf('MOD_LOGIN_HINAME', $user->get('username'));
	} endif; ?>
	</div>
<?php endif; ?>
	<div class="logout-button">
		<input type="submit" name="Submit" class="button" value="<?php echo JText::_('JLOGOUT'); ?>" />
		<input type="hidden" name="option" value="com_users" />
		<input type="hidden" name="task" value="user.logout" />
		<input type="hidden" name="return" value="<?php echo $return; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>
<?php else : ?>
<form action="<?php echo JRoute::_('index.php', true, $params->get('usesecure')); ?>" method="post" id="login-form" >
	<?php if ($params->get('pretext')): ?>
		<div class="pretext">
		<p><?php echo $params->get('pretext'); ?></p>
		</div>
	<?php endif; ?>
	<fieldset class="userdata">
	 <div class="ulogin1">
	<label for="login"><i class="icon-user"></i>Username</label>
		<input id="modlgn-username" type="text" name="username"  class="inputbox"  size="30" />
	</div>
	 <div class="ulogin2">
		<label for="password"><i class="icon-lock"></i>Password</label>
		<input id="modlgn-passwd" type="password" name="password" class="inputbox" size="30"  />
	</div>
    <div style="clear:both;"></div>
    <div class="jlogin1">
		<input type="submit" name="Submit" class="button btnmore" value="<?php echo JText::_('JLOGIN') ?>" />
	</div>
	<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
    <div class="jlogin2">
	
		<?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?>
		<input id="modlgn-remember" type="checkbox" name="remember" class="inputbox" value="yes"/>
	</div>
	<?php endif; ?>
	
   <div style="clear:both;"></div>		
	<input type="hidden" name="option" value="com_users" />
	<input type="hidden" name="task" value="user.login" />
	<input type="hidden" name="return" value="<?php echo $return; ?>" />
	<?php echo JHtml::_('form.token'); ?>
    
	</fieldset>
	<br /><div class="jlogintext">	
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
			<i class="icon-lock"></i><?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
		</div>&nbsp;&nbsp;&nbsp;
        <div class="jlogintext">
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
			<i class="icon-user"></i><?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
		</div>&nbsp;&nbsp;&nbsp;
		<?php
		$usersConfig = JComponentHelper::getParams('com_users');
		if ($usersConfig->get('allowUserRegistration')) : ?>
		
			<div class="jlogintext"><a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
			<i class="icon-plus-sign"></i>	<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a></div>
		
		<?php endif; ?>
	
	<?php if ($params->get('posttext')): ?>
		<div class="posttext">
		<p><?php echo $params->get('posttext'); ?></p>
		</div>
	<?php endif; ?>
</form>
<?php endif; ?>

