<?php
/**
 * Edit account form
 *
 * This template can be overridden by copying it to yourtheme/wp-real-estate/my-account/form-edit-account.php.
 */
if ( ! defined( 'ABSPATH' ) ) {
	exit;
}
do_action( 'wre_before_edit_account_form' );
?>
<form class="wre-form" id="wre-edit-form" action="" method="post">

	<?php do_action( 'wre_edit_account_form_start' ); ?>

	<p class="wre-form-row">
		<label for="account_first_name"><?php _e( 'First name', 'wp-real-estate' ); ?> <span class="required">*</span></label>
		<input type="text" class="wre-text" name="account_first_name" id="account_first_name" value="<?php echo esc_attr( $user->first_name ); ?>" />
	</p>
	<p class="wre-form-row">
		<label for="account_last_name"><?php _e( 'Last name', 'wp-real-estate' ); ?> <span class="required">*</span></label>
		<input type="text" class="wre-text" name="account_last_name" id="account_last_name" value="<?php echo esc_attr( $user->last_name ); ?>" />
	</p>
	<div class="clear"></div>

	<p class="wre-form-row">
		<label for="account_email"><?php _e( 'Email address', 'wp-real-estate' ); ?> <span class="required">*</span></label>
		<input type="email" class="wre-text" name="account_email" id="account_email" value="<?php echo esc_attr( $user->user_email ); ?>" />
	</p>

	<fieldset>
		<legend><?php _e( 'Password change', 'wp-real-estate' ); ?></legend>

		<p class="wre-form-row">
			<label for="password_current"><?php _e( 'Current password (leave blank to leave unchanged)', 'wp-real-estate' ); ?></label>
			<input type="password" class="wre-text" name="password_current" id="password_current" />
		</p>
		<p class="wre-form-row">
			<label for="password_1"><?php _e( 'New password (leave blank to leave unchanged)', 'wp-real-estate' ); ?></label>
			<input type="password" class="wre-text" name="password_1" id="password_1" />
		</p>
		<p class="wre-form-row">
			<label for="password_2"><?php _e( 'Confirm new password', 'wp-real-estate' ); ?></label>
			<input type="password" class="wre-text" name="password_2" id="password_2" />
		</p>
	</fieldset>
	<div class="clear"></div>

	<?php do_action( 'wre_edit_account_form' ); ?>

	<p>
		<?php wp_nonce_field( 'save_account_details' ); ?>
		<input type="submit" class="wre-button button" name="save_account_details" value="<?php esc_attr_e( 'Save changes', 'wp-real-estate' ); ?>" />
		<input type="hidden" name="action" value="save_account_details" />
	</p>

	<?php do_action( 'wre_edit_account_form_end' ); ?>
</form>

<?php do_action( 'wre_after_edit_account_form' );