extends base

block vars
  - var title = 'Forgot Your Password?'
  - var description = 'Forgot your password? No worries!'
  - var bodytag = 'login'

block body
  .container.custom-container
    .va-wrapper
      .view.login-view.container
        if status==='invalid_sptoken'
          .row
            .alert.alert-warning.invalid-sp-token-warning
              p.
                The password reset link you tried to use is no longer valid.
                Please request a new link from the form below.
        .box.row
          .email-password-area.col-xs-12.large.col-sm-12
            .header

              span.
                Forgot your password?

              p.
                Enter your email address below to reset your password. You will
                be sent an email which you will need to open to continue. You may
                need to check your spam folder.

            if error
              .alert.alert-danger.bad-login
                p #{error}

            if formErrors
              .alert.alert-danger.bad-login
                each error in formErrors
                  p #{error.error}

            form.login-form.form-horizontal(method='post', role='form', action=stormpathConfig.web.forgotPassword.uri)
              input(name='_csrf', type='hidden', value=csrfToken)

              .form-group.group-email
                label.col-sm-4 Email

                div.col-sm-8
                  input.form-control(placeholder='Email', required=true, name='email', type='text')

              div
                button.login.btn.btn-login.btn-sp-green(type='submit') Send Email

        if stormpathConfig.web.login.enabled
          a.forgot(href="#{stormpathConfig.web.login.uri}") Back to Log In
