PageRenderTime 41ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/src/main/webapp/app/account/register/register.html

https://gitlab.com/pidlisnyi/spring-angular
HTML | 123 lines | 116 code | 7 blank | 0 comment | 0 complexity | 03dd503f1647027332f14599866a33f5 MD5 | raw file
  1. <div>
  2. <div class="row">
  3. <div class="col-md-8 col-md-offset-2">
  4. <h1 translate="register.title">Registration</h1>
  5. <div class="alert alert-success" ng-show="vm.success" translate="register.messages.success">
  6. <strong>Registration saved!</strong> Please check your email for confirmation.
  7. </div>
  8. <div class="alert alert-danger" ng-show="vm.error" translate="register.messages.error.fail">
  9. <strong>Registration failed!</strong> Please try again later.
  10. </div>
  11. <div class="alert alert-danger" ng-show="vm.errorUserExists" translate="register.messages.error.userexists">
  12. <strong>Login name already registered!</strong> Please choose another one.
  13. </div>
  14. <div class="alert alert-danger" ng-show="vm.errorEmailExists" translate="register.messages.error.emailexists">
  15. <strong>E-mail is already in use!</strong> Please choose another one.
  16. </div>
  17. <div class="alert alert-danger" ng-show="vm.doNotMatch" translate="global.messages.error.dontmatch">
  18. The password and its confirmation do not match!
  19. </div>
  20. </div>
  21. <div class="col-md-8 col-md-offset-2">
  22. <form ng-show="!vm.success" name="form" role="form" novalidate ng-submit="vm.register()" show-validation>
  23. <div class="form-group">
  24. <label class="control-label" for="login" translate="global.form.username">Username</label>
  25. <input type="text" class="form-control" id="login" name="login" placeholder="{{'global.form.username.placeholder' | translate}}"
  26. ng-model="vm.registerAccount.login" ng-minlength=1 ng-maxlength=50 ng-pattern="/^[_'.@A-Za-z0-9-]*$/" required>
  27. <div ng-show="form.login.$dirty && form.login.$invalid">
  28. <p class="help-block"
  29. ng-show="form.login.$error.required" translate="register.messages.validate.login.required">
  30. Your username is required.
  31. </p>
  32. <p class="help-block"
  33. ng-show="form.login.$error.minlength" translate="register.messages.validate.login.minlength">
  34. Your username is required to be at least 1 character.
  35. </p>
  36. <p class="help-block"
  37. ng-show="form.login.$error.maxlength" translate="register.messages.validate.login.maxlength">
  38. Your username cannot be longer than 50 characters.
  39. </p>
  40. <p class="help-block"
  41. ng-show="form.login.$error.pattern" translate="register.messages.validate.login.pattern">
  42. Your username can only contain lower-case letters and digits.
  43. </p>
  44. </div>
  45. </div>
  46. <div class="form-group">
  47. <label class="control-label" for="email" translate="global.form.email">E-mail</label>
  48. <input type="email" class="form-control" id="email" name="email" placeholder="{{'global.form.email.placeholder' | translate}}"
  49. ng-model="vm.registerAccount.email" ng-minlength=5 ng-maxlength=100 required>
  50. <div ng-show="form.email.$dirty && form.email.$invalid">
  51. <p class="help-block"
  52. ng-show="form.email.$error.required" translate="global.messages.validate.email.required">
  53. Your e-mail is required.
  54. </p>
  55. <p class="help-block"
  56. ng-show="form.email.$error.email" translate="global.messages.validate.email.invalid">
  57. Your e-mail is invalid.
  58. </p>
  59. <p class="help-block"
  60. ng-show="form.email.$error.minlength" translate="global.messages.validate.email.minlength">
  61. Your e-mail is required to be at least 5 characters.
  62. </p>
  63. <p class="help-block"
  64. ng-show="form.email.$error.maxlength" translate="global.messages.validate.email.maxlength">
  65. Your e-mail cannot be longer than 100 characters.
  66. </p>
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <label class="control-label" for="password" translate="global.form.newpassword">New password</label>
  71. <input type="password" class="form-control" id="password" name="password" placeholder="{{'global.form.newpassword.placeholder' | translate}}"
  72. ng-model="vm.registerAccount.password" ng-minlength=4 ng-maxlength=50 required>
  73. <div ng-show="form.password.$dirty && form.password.$invalid">
  74. <p class="help-block"
  75. ng-show="form.password.$error.required" translate="global.messages.validate.newpassword.required">
  76. Your password is required.
  77. </p>
  78. <p class="help-block"
  79. ng-show="form.password.$error.minlength" translate="global.messages.validate.newpassword.minlength">
  80. Your password is required to be at least 4 characters.
  81. </p>
  82. <p class="help-block"
  83. ng-show="form.password.$error.maxlength" translate="global.messages.validate.newpassword.maxlength">
  84. Your password cannot be longer than 50 characters.
  85. </p>
  86. </div>
  87. <password-strength-bar password-to-check="vm.registerAccount.password"></password-strength-bar>
  88. </div>
  89. <div class="form-group">
  90. <label class="control-label" for="confirmPassword" translate="global.form.confirmpassword">New password confirmation</label>
  91. <input type="password" class="form-control" id="confirmPassword" name="confirmPassword" placeholder="{{'global.form.confirmpassword.placeholder' | translate}}"
  92. ng-model="vm.confirmPassword" ng-minlength=4 ng-maxlength=50 required>
  93. <div ng-show="form.confirmPassword.$dirty && form.confirmPassword.$invalid">
  94. <p class="help-block"
  95. ng-show="form.confirmPassword.$error.required" translate="global.messages.validate.confirmpassword.required">
  96. Your confirmation password is required.
  97. </p>
  98. <p class="help-block"
  99. ng-show="form.confirmPassword.$error.minlength" translate="global.messages.validate.confirmpassword.minlength">
  100. Your confirmation password is required to be at least 4 characters.
  101. </p>
  102. <p class="help-block"
  103. ng-show="form.confirmPassword.$error.maxlength" translate="global.messages.validate.confirmpassword.maxlength">
  104. Your confirmation password cannot be longer than 50 characters.
  105. </p>
  106. </div>
  107. </div>
  108. <button type="submit" ng-disabled="form.$invalid" class="btn btn-primary" translate="register.form.button">Register</button>
  109. </form>
  110. <p></p>
  111. <div class="alert alert-warning" translate="global.messages.info.authenticated" translate-compile>
  112. If you want to <a class="alert-link" href="" ng-click="vm.login()">sign in</a>, you can try the default accounts:<br/>- Administrator (login="admin" and password="admin") <br/>- User (login="user" and password="user").
  113. </div>
  114. </div>
  115. </div>
  116. </div>