The next generation of the Teknik Services. Written in ASP.NET. https://www.teknik.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Register.cshtml 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. @model Teknik.Areas.Users.ViewModels.RegisterViewModel
  2. @if (Model.Config.UserConfig.RegistrationEnabled)
  3. {
  4. <div class="row">
  5. <div class="col-sm-12 text-center">
  6. <div id="registerStatus">
  7. @if (Model.Error)
  8. {
  9. <div class="alert alert-danger alert-dismissable"><button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>@Model.ErrorMessage</div>
  10. }
  11. </div>
  12. </div>
  13. </div>
  14. <form id="registrationForm" action="@Url.SubRouteUrl("user", "User.Register")" method="post" accept-charset="UTF-8">
  15. <input name="Register.ReturnUrl" id="registerReturnUrl" type="hidden" value="@Model.ReturnUrl" />
  16. <div class="form-group">
  17. <input type="text" class="form-control" id="registerUsername" value="" placeholder="Username" name="Register.Username" data-val-required="The Username field is required." data-val="true"/>
  18. </div>
  19. <div class="form-group">
  20. <input type="password" class="form-control" id="registerPassword" value="" placeholder="Password" name="Register.Password" data-val-required="The Password field is required." data-val="true"/>
  21. </div>
  22. <div class="form-group">
  23. <input type="password" class="form-control" id="registerConfirmPassword" value="" placeholder="Confirm Password" name="Register.ConfirmPassword" data-val-required="The Confirm Password field is required." data-val="true" />
  24. </div>
  25. <div class="form-group">
  26. <input type="text" class="form-control" id="registerRecoveryEmail" value="" placeholder="Recovery Email (Optional)" name="Register.RecoveryEmail" />
  27. </div>
  28. <div class="form-group">
  29. <textarea class="form-control" id="registerPublicKey" name="Register.PublicKey" placeholder="PGP Public Key (Optional)" title="enter your pgp public key" rows="5"></textarea>
  30. </div>
  31. <p class="text-center">
  32. <small>
  33. Username must meet the following requirements: <var>@Model.Config.UserConfig.UsernameFilterLabel</var><br />
  34. and the length must be greater than <b>@Model.Config.UserConfig.MinUsernameLength</b> and less than <b>@Model.Config.UserConfig.MaxUsernameLength</b> characters
  35. </small>
  36. </p>
  37. <p class="text-center">
  38. By registering for Teknik, you agree to the <a href="@Url.SubRouteUrl("tos", "TOS.Index")" target="_blank">Terms of Service</a>.
  39. </p>
  40. <div class="form-group text-center">
  41. <button class="btn btn-primary" id="registerSubmit" type="submit" name="Register.Submit">Sign Up</button>
  42. </div>
  43. </form>
  44. }
  45. else
  46. {
  47. <h3>Registration has been disabled</h3>
  48. }