signup.ejs 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <div id="signup" v-cloak>
  2. <div class="container" v-if="!cloudSuccess">
  3. <h1 class="text-center">Create an account</h1>
  4. <div class="signup-form">
  5. <p class="text-center">Let's get started! Becoming a member is free and only takes a few minutes.</p>
  6. <hr/>
  7. <ajax-form action="signup" :syncing.sync="syncing" :cloud-error.sync="cloudError" @submitted="submittedForm()" :handle-parsing="handleParsingForm">
  8. <div class="form-group">
  9. <label for="full-name">Full name</label>
  10. <input class="form-control" id="full-name" autofocus type="text" :class="[formErrors.fullName ? 'is-invalid' : '']" v-model.trim="formData.fullName" placeholder="Sturgis P. Sturgeon">
  11. <div class="invalid-feedback" v-if="formErrors.fullName">Please enter your full name.</div>
  12. </div>
  13. <div class="form-group">
  14. <label for="email-address">Email address</label>
  15. <input class="form-control" id="email-address" type="email" :class="[formErrors.emailAddress ? 'is-invalid' : '']" v-model.trim="formData.emailAddress" placeholder="sturgeon@example.com">
  16. <div class="invalid-feedback" v-if="formErrors.emailAddress">Please enter a valid email address.</div>
  17. </div>
  18. <div class="form-group">
  19. <label for="password">Choose a password</label>
  20. <input class="form-control" id="password" type="password" :class="[formErrors.password ? 'is-invalid' : '']" v-model.trim="formData.password" placeholder="••••••••">
  21. <div class="invalid-feedback" v-if="formErrors.password">Please enter a password.</div>
  22. </div>
  23. <div class="form-group">
  24. <label for="confirm-password">Confirm password</label>
  25. <input class="form-control" id="confirm-password" type="password" :class="[formErrors.confirmPassword ? 'is-invalid' : '']" v-model.trim="formData.confirmPassword" placeholder="••••••••">
  26. <div class="invalid-feedback" v-if="formErrors.confirmPassword">Your password and confirmation do not match.</div>
  27. </div>
  28. <div class="form-group">
  29. <label for="terms-agreement" class="form-check-label" :class="[formErrors.agreed ? 'text-danger' : '']">
  30. <input class="form-check-input" id="terms-agreement" type="checkbox" v-model="formData.agreed"> I have read &amp; agree to the <a target="_blank" href="/terms">terms of service</a>.
  31. </label>
  32. </div>
  33. <p class="text-danger" v-if="cloudError==='emailAlreadyInUse'"><small>It looks like there's already an account with your email address. If you forgot your password, you can recover it <a href="password/forgot">here</a>.</small></p>
  34. <p class="text-danger" v-else-if="cloudError"><small>An error occured while processing your request. Please check your information and try again, or <a href="/support">contact support</a> if the error persists.</small></p>
  35. <div class="form-group">
  36. <ajax-button type="submit" :syncing="syncing" class="btn-dark btn-lg btn-block">Create account</ajax-button>
  37. </div>
  38. </ajax-form>
  39. <p class="text-center">Have an account? <a href="/login">Sign in</a></p>
  40. </div>
  41. </div>
  42. <div class="container" v-if="cloudSuccess">
  43. <h1 class="text-center">Check your email!</h1>
  44. <div class="success-message">
  45. <hr/>
  46. <p>Your account is nearly ready. All you have to do is click the link we sent to <strong>{{formData.emailAddress}}</strong>.</p>
  47. <p>(You can still access your dashboard now, but some features will be unvavailable until we've verified your email address.)</p>
  48. <p><a class="btn btn-outline-info" href="/">Go to dashboard</a></p>
  49. </div>
  50. </div>
  51. </div>
  52. <%- /* Expose locals as `window.SAILS_LOCALS` :: */ exposeLocalsToBrowser() %>