extends ../../../layouts/account

block head
  title Verification Required

block neck
  link(rel='stylesheet', href='/views/account/verification/index.min.css?#{cacheBreaker}')

block feet
  script(src='/views/account/verification/index.min.js?#{cacheBreaker}')

block body
  div.row
    div.col-sm-6
      div.page-header
        h1 Verification Required
      div.alert.alert-warning Your account is nearly ready. Check your inbox for next steps.
      div#verify
    div.col-sm-6.special
      div.page-header
        h1 You're Almost Done
      i.fa.fa-key.super-awesome

  script(type='text/template', id='tmpl-verify')
    form
      div.alerts
        |<% _.each(errors, function(err) { %>
        div.alert.alert-danger.alert-dismissable
          button.close(type='button', data-dismiss='alert') &times;
          |<%- err %>
        |<% }); %>
        |<% if (success) { %>
        div.alert.alert-info.alert-dismissable
          button.close(type='button', data-dismiss='alert') &times;
          | Verification email successfully re-sent.
        |<% } %>
      |<% if (!success) { %>
      div(class!='not-received<%= !keepFormOpen ? "" : " not-received-hidden" %>')
        a.btn.btn-link.btn-resend I checked my email and spam folder, nothing yet.
      div(class!='verify-form<%= keepFormOpen ? "" : " verify-form-hidden" %>')
        div.form-group(class!='<%- errfor.email ? "has-error" : "" %>')
          label Your Email:
          input.form-control(type='text', name='email', value!='<%= email %>')
          span.help-block <%- errfor.email %>
        div.form-group
          button.btn.btn-primary.btn-verify(type='button') Re-Send Verification
      |<% } %>

  script(type='text/template', id='data-user') !{data.user}
