PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 1ms app.codeStats 0ms

/AnotherStartup/Account/Register.cshtml

#
Razor | 59 lines | 52 code | 2 blank | 5 comment | 2 complexity | dc6bd6e3de3e61a52f23bdc76fb46c88 MD5 | raw file
  1. @{this.Init(layout: "~/_SiteLayout.cshtml", title: "Register an Account", action: Account.Register.Init);}
  2. <p>
  3. Use the form below to create a new account.
  4. </p>
  5. @* If at least one validation error exists, notify the user *@
  6. @if (!Page.IsValid) {
  7. <p class="message error">
  8. @if (Page.Errors.AccountCreation.IsError) {
  9. @Page.Errors.AccountCreation.Message;
  10. } else {
  11. @:Please correct the errors and try again.
  12. }
  13. </p>
  14. }
  15. <form method="post" action="">
  16. <fieldset>
  17. <legend>Sign-up Form</legend>
  18. <ol>
  19. <li class="email">
  20. <label for="email">Email:</label>
  21. <input type="text" id="email" name="email" title="Email address" value="@Page.Model.Email" @if(Page.Errors.Email.IsError){<text>class="error-field"</text>} />
  22. @if (Page.Errors.Email.IsError) {
  23. <label for="email" class="validation-error">@Page.Errors.Email.Message</label>
  24. }
  25. </li>
  26. <li class="password">
  27. <label for="password">Password:</label>
  28. <input type="password" id="password" name="password" title="Password" @if(Page.Errors.Password.IsError){<text>class="error-field"</text>} />
  29. @if (Page.Errors.Password.IsError) {
  30. <label for="password" class="validation-error">@Page.Errors.Password.Message</label>
  31. }
  32. </li>
  33. <li class="confirm-password">
  34. <label for="confirmPassword">Confirm Password:</label>
  35. <input type="password" id="confirmPassword" name="confirmPassword" title="Confirm password" @if(Page.Errors.ConfirmPassword.IsError){<text>class="error-field"</text>} />
  36. @if (Page.Errors.ConfirmPassword.IsError) {
  37. <label for="confirmPassword" class="validation-error">@Page.Errors.ConfirmPassword.Message</label>
  38. }
  39. </li>
  40. <li class="recaptcha">
  41. <div class="message info">
  42. <p>To enable CAPTCHA verification, <a href="http://go.microsoft.com/fwlink/?LinkId=204140">install the ASP.NET Web Helpers Library</a> and uncomment ReCaptcha.GetHtml and replace 'PUBLIC_KEY'
  43. with your public key. At the top of this page, uncomment ReCaptcha.Validate and
  44. replace 'PRIVATE_KEY' with your private key, and also uncomment the captchaMessage variable.</p>
  45. <p>Register for reCAPTCHA keys at <a href="http://recaptcha.net">reCAPTCHA.net</a>.</p>
  46. </div>
  47. @*@ReCaptcha.GetHtml("PUBLIC_KEY", theme: "white")
  48. @if (Page.Errors.Captcha.IsError) {
  49. <label class="validation-error">Page.Errors.Captcha.Message</label>
  50. }*@
  51. </li>
  52. </ol>
  53. <p class="form-actions">
  54. <input type="submit" value="Register" title="Register" />
  55. </p>
  56. </fieldset>
  57. </form>