<div id="forgot-password" v-cloak>
  <div style="max-width: 480px;" class="container-fluid px-3 px-xl-0 pb-5">
    <div v-if="!cloudSuccess">
    <h1 class="text-left">Forgot your password?</h1>
      <div purpose="customer-portal-form">
        <div class="card card-body mx-auto">
          <ajax-form  action="sendPasswordRecoveryEmail" :syncing.sync="syncing" :cloud-error.sync="cloudError" :form-data="formData" :form-rules="formRules" :form-errors.sync="formErrors" @submitted="submittedForm()">
            <div class="form-group">
              <label for="email-address">Email</label>
              <input type="email" name="email-address" class="form-control" placeholder="example@email.com" :class="[formErrors.emailAddress ? 'is-invalid' : '']" v-model.trim="formData.emailAddress" autocomplete="email" focus-first>
              <div class="invalid-feedback" v-if="formErrors.emailAddress">Please enter a valid email address.</div>
            </div>
            <cloud-error v-if="cloudError"></cloud-error>
            <ajax-button purpose="submit-button" type="submit" :syncing="syncing" class="btn-info btn-lg btn-block">Reset password</ajax-button>
          </ajax-form>
        </div>
      </div>
    </div>
    <div style="max-width:  480px;" class="mx-auto text-center" v-else>
      <h1 class="text-center">Password recovery sent</h1>
      <p><strong>We've sent you a link to update your password.</strong></p>
      <p>
      If the email you entered is associated with a Fleet account, you should receive a recovery email shortly. If the email doesn’t arrive, please try again, or <a href="/contact">contact support</a>.
      </p>
      <p class="text-center"><a purpose="back-button" class="btn btn-info" href="/login"><span>Back to login</span></a></p>
    </div>
  </div>
</div>
<%- /* Expose locals as `window.SAILS_LOCALS` :: */ exposeLocalsToBrowser() %>
