<?php
/**
 * Lost password form
 *
 * @author 		WooThemes
 * @package 	WooCommerce/Templates
 * @version     2.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

global $woocommerce, $post;

?>

<?php wc_print_notices(); ?>

<div class="box-wrapper">
	<div class="inside">


		<div class="page-title">
			<h1>
				<?php	if( 'lost_password' == $args['form'] ) { ?>
					<?php _e('Forgot Your Password?', 'buyshop'); ?>
				<?php } else { ?>
					<?php _e('New Password', 'buyshop'); ?>
				<?php } // endif; ?>
			</h1>
		</div>
		<form action="<?php echo esc_url( get_permalink($post->ID) ); ?>" method="post" class="lost_reset_password">
			<div class="fieldset">

				<?php	if( 'lost_password' == $args['form'] ) { ?>
					<p><?php echo apply_filters( 'woocommerce_lost_password_message', __( 'Lost your password? Please enter your username or email address. You will receive a link to create a new password via email.', 'woocommerce' ) ); ?></p>
				<?php } else { ?>
					<p><?php echo apply_filters( 'woocommerce_reset_password_message', __( 'Enter a new password below.', 'woocommerce') ); ?></p>
				<?php } // endif; ?>

				<ul class="form-list">

					<?php	if( 'lost_password' == $args['form'] ) { ?>
						<li>

							<label class="required" for="user_login"><em>*</em><?php _e( 'Username or email', 'woocommerce' ); ?></label>
							<div class="input-box">

								<input class="input-text required-entry validate-email" type="text" name="user_login" id="user_login" alt="email" />
							</div>
						</li>
					<?php } else { ?>
						<li>
							<label for="password_1"><em>*</em><?php _e( 'New password', 'woocommerce' ); ?></label>
							<input type="password" class="input-text" name="password_1" id="password_1" />
						</li>
						<li>
							<label for="password_2"><em>*</em><?php _e( 'Re-enter new password', 'woocommerce' ); ?></label>
							<input type="password" class="input-text" name="password_2" id="password_2" />
						</li>

						<input type="hidden" name="reset_key" value="<?php echo isset( $args['key'] ) ? $args['key'] : ''; ?>" />
						<input type="hidden" name="reset_login" value="<?php echo isset( $args['login'] ) ? $args['login'] : ''; ?>" />
					<?php } // endif; ?>

				</ul>
			</div>
			<div class="buttons-set">
				<p class="required">* <?php _e('Required Fields', 'buyshop'); ?></p>
				<input type="submit" class="button" name="reset" value="<?php echo 'lost_password' == $args['form'] ? __( 'Reset Password', 'woocommerce' ) : __( 'Save', 'woocommerce' ); ?>" />
				<?php $woocommerce->nonce_field( $args['form'] ); ?>
			</div>
		</form>

	</div>
</div>