<?php
/**
 * @version		$Id: default.php 20196 2011-01-09 02:40:25Z ian $
 * @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" class="yjsg-form">
<?php if ($params->get('greeting')) : ?>
	<div class="login-greeting">
	<?php if($params->get('name') == 0) : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('name')));
	} else : {
		echo JText::sprintf('MOD_LOGIN_HINAME', htmlspecialchars($user->get('username')));
	} endif; ?>
	</div>
<?php endif; ?>
	<div class="yjsg-form-group">
        <button type="submit" tabindex="3" name="Submit" class="button"><?php echo JText::_('JLOGOUT') ?></button>
		<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" class="yjsg-form">
	<div class="pretext">
	<?php echo $params->get('pretext'); ?>
	</div>
	<div class="yjsg-form-group-addon">
		<span class="yjsg-form-prepend"><span class="icon-user"></span></span>
		<input id="modlgn_username" type="text" name="username" class="yjsg-form-element"  size="18" placeholder="<?php echo JText::_('MOD_LOGIN_VALUE_USERNAME') ?>" />
	</div>
	<div class="yjsg-form-group-addon">
		<span class="yjsg-form-prepend"><span class="icon-lock"></span></span>
		<input id="modlgn_passwd" type="password" name="password" class="yjsg-form-element" size="18" placeholder="<?php echo JText::_('JGLOBAL_PASSWORD') ?>" />
	</div>
	<?php if (isset($twofactormethods) && count($twofactormethods) > 1): ?>
	<div class="yjsg-form-group-addon">
		<span class="yjsg-form-prepend"><span class="icon-key"></span></span>
		<input id="modlgn_secretkey" type="text" name="secretkey" class="yjsg-form-element" size="18" placeholder="<?php echo JText::_('JGLOBAL_SECRETKEY') ?>" />
	</div>		
	<?php endif; ?>
    <div class="yjsg-form-group-inline">    
		<?php if (JPluginHelper::isEnabled('system', 'remember')) : ?>
		  <label class="checkbox-label" id="modlgn_remember_l">
				<input id="modlgn_remember" type="checkbox"> <?php echo JText::_('MOD_LOGIN_REMEMBER_ME') ?>
		  </label>
		<?php endif; ?>
		<div class="yjsg-element-holder">
			<button type="submit" tabindex="3" name="Submit" class="button"><?php echo JText::_('JLOGIN') ?></button>
		</div>
	</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'); ?>
	<ul class="unstyled">
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=reset'); ?>">
			<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_PASSWORD'); ?></a>
		</li>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=remind'); ?>">
			<?php echo JText::_('MOD_LOGIN_FORGOT_YOUR_USERNAME'); ?></a>
		</li>
		<?php
		$usersConfig = JComponentHelper::getParams('com_users');
		if ($usersConfig->get('allowUserRegistration')) : ?>
		<li>
			<a href="<?php echo JRoute::_('index.php?option=com_users&view=registration'); ?>">
				<?php echo JText::_('MOD_LOGIN_REGISTER'); ?></a>
		</li>
		<?php endif; ?>
	</ul>
	<div class="posttext">
	<?php echo $params->get('posttext'); ?>
	</div>
</form>
<?php endif; ?>