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 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. @model Teknik.Areas.Users.ViewModels.RegisterViewModel
  2. @if (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("account", "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. <label for="registerUsername">Username <span class="text-danger">*</span></label>
  18. <input type="text" class="form-control" id="registerUsername" value="" placeholder="Bob" name="Register.Username" data-val-required="The Username field is required." data-val="true"/>
  19. </div>
  20. <div class="form-group">
  21. <label for="registerPassword">Password <span class="text-danger">*</span></label>
  22. <input type="password" class="form-control" id="registerPassword" value="" placeholder="********" name="Register.Password" data-val-required="The Password field is required." data-val="true"/>
  23. </div>
  24. <div class="form-group">
  25. <label for="registerConfirmPassword">Confirm Password <span class="text-danger">*</span></label>
  26. <input type="password" class="form-control" id="registerConfirmPassword" value="" placeholder="********" name="Register.ConfirmPassword" data-val-required="The Confirm Password field is required." data-val="true"/>
  27. </div>
  28. <div class="form-group">
  29. <label for="registerInviteCode">Invite Code@(Html.Raw(Config.UserConfig.InviteCodeRequired ? " <span class=\"text-danger\">*</span>" : string.Empty))</label>
  30. <input type="text" class="form-control" id="registerInviteCode" value="@Model.InviteCode" placeholder="XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" name="Register.InviteCode"/>
  31. </div>
  32. <div class="form-group">
  33. <label for="registerRecoveryEmail">Recovery Email</label>
  34. <input type="text" class="form-control" id="registerRecoveryEmail" value="" placeholder="user@example.com" name="Register.RecoveryEmail"/>
  35. </div>
  36. <p class="text-center">
  37. <small>
  38. Username must meet the following requirements: <var>@Config.UserConfig.UsernameFilterLabel</var><br />
  39. and the length must be greater than <b>@Config.UserConfig.MinUsernameLength</b> and less than <b>@Config.UserConfig.MaxUsernameLength</b> characters
  40. </small>
  41. </p>
  42. <p class="text-center">
  43. By registering for Teknik, you agree to the <a href="@Url.SubRouteUrl("tos", "TOS.Index")" target="_blank">Terms of Service</a>.
  44. </p>
  45. <div class="form-group text-center">
  46. <button class="btn btn-primary" id="registerSubmit" type="submit" name="Register.Submit">Sign Up</button>
  47. </div>
  48. </!form>
  49. }
  50. else
  51. {
  52. <h3>Registration has been disabled</h3>
  53. }