<?php
do_action('dolphy_access_header');

$signinUrl = wp_login_url();

$user = check_password_reset_key($_GET['key'], $_GET['login']);

if (is_wp_error($user)) {
  wp_redirect($signinUrl, 301);
  exit;
}
?>

<div class="content reset-password" id="reset-password-page">
  <fieldset v-bind:disabled="loading">
    <form name="ResetPassword" v-on:submit="submit">
      <h3 class="dol-text-center">Reset Password</h3>

      <div class="field-group">
        <div class="field-group-icon">
          <i class="fa fa-fw fa-lock"></i>
        </div>
        <input type="password" v-model="form.password" autocomplete="new-password" placeholder="New Password">
      </div>

      <div class="field-group">
        <div class="field-group-icon">
          <i class="fa fa-fw fa-lock"></i>
        </div>
        <input type="password" v-model="form.confirmPassword" autocomplete="new-password" placeholder="Confirm New Password">
      </div>

      <div class="form-group">
        <button type="submit">Change Password</button>
      </div>
    </form>
  </fieldset>

  <div class="form-group mini-text dol-text-center">
    <a href="<?php echo esc_url($signinUrl); ?>">SIGN IN</a>
  </div>

  <dolphy-dialog-placeholder></dolphy-dialog-placeholder>
</div>

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