Advertisement
Guest User

Untitled

a guest
Jun 11th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.w3.org/1999/xhtml" xmlns:sec="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <link rel="stylesheet" href="/webjars/bootstrap/3.3.7/css/bootstrap.min.css"/>
  5.  
  6. <title>Interviewer</title>
  7. <link rel="stylesheet" th:href="@{/css/custom-style.css}"/>
  8. <link rel="stylesheet" th:href="@{/css/userNewStyle.css}"/>
  9. </head>
  10. <body>
  11. <div class="container-fluid">
  12. <!--/*/ <th:block th:include="fragments/header :: header"><th:block> /*/-->
  13. </div>
  14. <div class="container-fluid">
  15. <div class="row">
  16. <div class="col-xs-2">
  17. <!--/*/ <th:block th:include="fragments/header :: sidebar"><th:block> /*/-->
  18. </div>
  19. <div class="col-xs-10">
  20. <div class="container">
  21. <div class="row">
  22. <div class="col-xs-5 col-xs-offset-2 row-container">
  23. <h3 class="text-center">Add New User</h3>
  24. <hr/>
  25. <form th:action="@{/users/new}" th:object="${user}" method="post" class="form-container">
  26. <div class="form-group">
  27. <label for="username">Username:</label>
  28. <input type="text" required minlength="5" maxlength="15" th:field="*{username}"
  29. class="form-control" id="username" placeholder="Enter username" name="username"/>
  30. <p class="text-danger" th:if="${usernameError}" th:text="${usernameError}"></p>
  31. <p class="text-danger" th:if="${#fields.hasErrors('username')}" th:errors="*{username}">
  32. Username is required and must be between 5 and 15 characters</p>
  33. </div>
  34. <div class="form-group">
  35. <label for="password">Password:</label>
  36. <input type="password" required minlength="6" th:field="*{password}"
  37. class="form-control" id="password" placeholder="Enter password" name="password"/>
  38. <p class="text-danger" th:if="${#fields.hasErrors('password')}" th:errors="*{password}">
  39. Password minimum length is 6 characters</p>
  40. </div>
  41. <div class="form-group">
  42. <label for="confirmNewPassword">Confirm Password:</label>
  43. <input type="password" class="form-control" id="confirmNewPassword"
  44. placeholder="Confirm Password" name="confirmNewPassword"/>
  45. </div>
  46. <p class="text-danger" th:if="${passwordError}" th:text="${passwordError}"></p>
  47. <div class="form-group">
  48. <label for="name">Name:</label>
  49. <input type="text" required minlength="3" maxlength="20" th:field="*{name}"
  50. class="form-control" id="name" placeholder="Enter name" name="name"/>
  51. <p class="text-danger" th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Name is
  52. required and must be between 3 and 20 characters</p>
  53. </div>
  54. <div class="form-group">
  55. <label for="email">Email:</label>
  56. <input type="text" required th:field="*{email}" class="form-control" id="email"
  57. placeholder="Enter email" name="email"/>
  58. <p class="text-danger" th:if="${emailError}" th:text="${emailError}"></p>
  59. <p class="text-danger" th:if="${#fields.hasErrors('email')}" th:errors="*{email}">Email
  60. is required</p>
  61. </div>
  62. <div class="form-group">
  63. <label for="selectRole">Select role:</label>
  64. <select id="selectRole" required th:field="*{roles}" name="selectRole"
  65. class="form-control">
  66. <option th:each="role : ${roles}" th:value="${role}" th:text="${role}"></option>
  67. </select>
  68. </div>
  69. <div class="form-group" th:if="${not #lists.isEmpty(companies)}">
  70. <label for="selectCompany">Select Company:</label>
  71. <select id="selectCompany" th:field="*{company}" name="selectCompany"
  72. class="form-control">
  73. <option th:value="null"></option>
  74. <option th:each="company : ${companies}" th:value="${company.id}"
  75. th:text="${company.name}"></option>
  76. </select>
  77. </div>
  78. <p class="text-center">
  79. <a href="/users" class="btn btn-default">Back</a>
  80. <button type="submit" class="btn btn-success">Add</button>
  81. </p>
  82. </form>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <script src="/webjars/jquery/2.1.1/jquery.js"></script>
  90. <script src="/webjars/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  91.  
  92. </body>
  93. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement