<div id="forgot-password" v-cloak>
  <div class="container-fluid pt-5 pb-5">
    <h1 class="text-center"><%=__('Recover')%>&nbsp;<%=__('Password')%></h1>
    <div style="max-width:  450px;" class="mx-auto" v-if="!cloudSuccess">
      <p class="text-center"><%=__('Enter your email address below to reset the password for your account')%></p>
      <hr/>
      <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">
          <input type="email" name="email-address" class="form-control" placeholder="sturgeon@example.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>
        <div class="form-group mt-2 text-center">
          <ajax-button type="submit" :syncing="syncing" class="btn btn-primary btn-lg btn-block"><%=__('Send Reset Link')%></ajax-button>
        </div>
      </ajax-form>
      <p class="text-center"><a href="/login"><%=__('Back to Login')%></a></p>
    </div>
    <div style="max-width:  450px;" class="mx-auto text-center" v-else>
      <p><%=__('Weve sent you a link to update your password')%>.</p>
      <hr/>
      <p><%=__('If the email doesnt arrive')%>, <%=__('or')%> <a href="/contact"><%=__('Contact support')%></a>.</p>
      <p class="text-center"><a class="btn btn-outline-primary" href="/login"><%=__('Back to Login')%></a></p>
    </div>
  </div>
</div>
<%- /* Expose locals as `window.SAILS_LOCALS` :: */ exposeLocalsToBrowser() %>
