<?php

/**
 *
 * @copyright  2010-2016 izend.org
 * @version    12
 * @link       http://www.izend.org
 */
?>
<?php extract($errors); ?>
<form action="" method="post">
<input type="hidden" name="remindme_token" value="<?php echo $token; ?>" />
<p class="inlabel<?php if ($missing_login or $bad_login): ?> inerror<?php endif; ?>"><?php if ($with_name): ?>What is your connection name?<?php else: ?>What is your email address?<?php endif; ?></p>
<p><input type="text" name="remindme_login" id="remindme_login" size="40" maxlength="100" title="Identifier" onkeypress="return focusonenter(event, 'remindme_code')" value="<?php echo htmlspecialchars($login, ENT_COMPAT, 'UTF-8'); ?>" /></p>
<?php if ($with_name): ?>
<p class="info">You may also enter your email address.</p>
<?php endif; ?>
<p><input name="remindme_confirmed" id="remindme_confirmed" type="checkbox" title="Confirmation" <?php if ($confirmed): ?> checked="checked"<?php endif; ?> />&nbsp;I want to receive a new password</p>
<?php if ($with_captcha): ?>
<p>
<img src="<?php echo $base_path; ?>/captcha/remindme" alt="" height="40" title="Verification code" />
:
<input type="text" name="remindme_code" id="remindme_code" size="4" maxlength="4" title="4 letters" autocomplete="off" onkeypress="return submitonenter(event, 'remindme_send')" value="" />
</p>
<?php endif; ?>
<p><input type="submit" class="submit submit_send" name="remindme_send" id="remindme_send" value="Send" /></p>
</form>
<div class="errors">
<?php if ($missing_code): ?>
<p>Enter the verification code displayed in the image.</p>
<?php elseif ($bad_code): ?>
<p>The verification code is incorrect.</p>
<?php endif; ?>
<?php if ($missing_login): ?>
<p>You haven't typed your identifier.</p>
<?php elseif ($bad_login): ?>
<p>The identifier is not valid.</p>
<?php endif; ?>
<?php if ($missing_confirmation): ?>
<p>Check the confirmation box.</p>
<?php endif; ?>
</div>
<?php extract($infos); ?>
<div class="infos">
<?php if ($internal_error): ?>
<p>An internal error has occurred.
<?php if ($contact_page): ?>If you can describe the problem, please <a href="<?php echo $contact_page; ?>" rel="nofollow">contact us</a>.<?php endif; ?></p>
<?php endif; ?>
<?php if ($email_sent): ?>
<p>A new password has been sent to you by email.<br />
To identify yourself, <a href="<?php echo $user_page; ?>">click here</a>.</p>
<?php endif; ?>
</div>
<?php
$focus=false;
if ($missing_code or $bad_code) {
	$focus='#remindme_code';
}
else if ($missing_login or $bad_login) {
	$focus='#remindme_login';
}
?>
<?php if ($focus): ?>
<script type="text/javascript">
$(function() {$('<?php echo $focus; ?>').focus();});
</script>
<?php endif; ?>
