Advertisement
Guest User

Untitled

a guest
Jan 12th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.63 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3. xmlns:th="http://www.thymeleaf.org">
  4.  
  5. <head>
  6. <title>Videos</title>
  7.  
  8. <link rel="stylesheet"
  9. href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css"
  10. integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb"
  11. crossorigin="anonymous">
  12. <link rel="stylesheet" type="text/css" th:href="@{/css/profile.css}"/>
  13. </head>
  14.  
  15. <body>
  16.  
  17. <nav class="navbar navbar-dark bg-dark">
  18. <a class="navbar-brand custom" href="/">
  19. <img th:src="@{/images/logo.jpeg}" width="30" height="30" alt="" class="d-inline-block align-top">
  20. Obo-Link
  21. </a>
  22. <ul class="navbar-nav mr-auto">
  23. <li class="nav-item active">
  24. <a class="nav-link" href="/profile">Profile</a>
  25. </li>
  26. </ul>
  27. <div class="justify-content-between">
  28. <button onclick="" id="logout" type="button" class="btn btn-outline-light">Logout</button>
  29. </div>
  30. </nav>
  31.  
  32. <br/>
  33.  
  34. <div class="container">
  35.  
  36. <h1> Profile </h1>
  37.  
  38. <br/>
  39.  
  40.  
  41. <!--
  42. <form method="post" action="XX">
  43. <div class="form-row align-items-center">
  44. <div class="col-auto">
  45. <label th:if="${#fields.hasErrors('username')}" th:errors="*{username}" for="username" class="sr-only">Username : </label>
  46. <input type="text" th:field="*{firstName}" class="form-control mb-2" id="username"
  47. placeholder="Username">
  48. </div>
  49. <div class="col-auto">
  50. <button type="submit" class="btn btn-primary mb-2">Update</button>
  51. </div>
  52. </div>
  53. </form>
  54.  
  55. <form method="post" action="XX">
  56. <div class="form-row align-items-center">
  57. <div class="col-auto">
  58. <label th:if="${#fields.hasErrors('firstName')}" th:errors="*{firstName}" for="firstName" class="sr-only">Firstname : </label>
  59. <input type="text" class="form-control mb-2" id="firstName" placeholder="First name">
  60. </div>
  61. <div class="col-auto">
  62. <button type="submit" class="btn btn-primary mb-2">Update</button>
  63. </div>
  64. </div>
  65. </form>
  66.  
  67. <form method="post" action="XX">
  68. <div class="form-row align-items-center">
  69. <div class="col-auto">
  70. <label th:if="${#fields.hasErrors('lastName')}" th:errors="*{lastName}" for="lastName" class="sr-only">Last name : </label>
  71. <input type="text" class="form-control mb-2" id="lastName" placeholder="Last name">
  72. </div>
  73. <div class="col-auto">
  74. <button type="submit" class="btn btn-primary mb-2">Update</button>
  75. </div>
  76. </div>
  77. </form>
  78.  
  79. <form method="post" action="XX">
  80. <div class="form-row align-items-center">
  81. <div class="col-auto">
  82. <label th:if="${#fields.hasErrors('email')}" th:errors="*{email}" for="email" class="sr-only">Email : </label>
  83. <input type="email" class="form-control mb-2" id="email" placeholder="Email">
  84. </div>
  85. <div class="col-auto">
  86. <button type="submit" class="btn btn-primary mb-2">Update</button>
  87. </div>
  88. </div>
  89. </form>
  90.  
  91. <form method="post" action="XX">
  92. <div class="form-row align-items-center">
  93. <div class="col-auto">
  94. <label th:if="${#fields.hasErrors('password')}" th:errors="*{password}" for="password" class="sr-only">Password : </label>
  95. <input type="password" class="form-control mb-2" id="password" placeholder="Password">
  96. </div>
  97. <div class="col-auto">
  98. <button type="submit" class="btn btn-primary mb-2">Update</button>
  99. </div>
  100. </div>
  101. </form>
  102. -->
  103.  
  104. <div class="row">
  105. <div class="col-6 offset-3">
  106. <form autocomplete="off" th:object="${user}" th:action="@{/profile/update}"
  107. method="post" class="form-horizontal"
  108. role="form">
  109. <h2>Profile modification</h2>
  110. <div class="form-group">
  111. <label th:if="${#fields.hasErrors('username')}" th:errors="*{username}"
  112. class="validation-message"></label>
  113. <input type="text" th:field="*{username}" placeholder="Username"
  114. class="form-control"/>
  115. </div>
  116. <div class="form-group">
  117. <label th:if="${#fields.hasErrors('firstName')}" th:errors="*{firstName}"
  118. class="validation-message"></label>
  119. <input type="text" th:field="*{firstName}" placeholder="First Name"
  120. class="form-control"/>
  121. </div>
  122. <div class="form-group">
  123. <label th:if="${#fields.hasErrors('lastName')}" th:errors="*{lastName}"
  124. class="validation-message"></label>
  125. <input type="text" th:field="*{lastName}"
  126. placeholder="Last Name" class="form-control"/>
  127. </div>
  128. <div class="form-group">
  129. <label th:if="${#fields.hasErrors('email')}" th:errors="*{email}"
  130. class="validation-message"></label>
  131. <input type="email" th:field="*{email}" placeholder="Email"
  132. class="form-control"/>
  133. </div>
  134. <div class="form-group">
  135. <label th:if="${#fields.hasErrors('password')}" th:errors="*{password}"
  136. class="validation-message"></label>
  137. <input type="password" th:field="*{password}" placeholder="Password"
  138. class="form-control"/>
  139. </div>
  140. <div class="form-group">
  141. <button type="submit" class="btn btn-primary btn-block">Update</button>
  142. </div>
  143.  
  144. <span th:utext="${successMessage}"></span>
  145. </form>
  146. </div>
  147. <div class="col-6 offset-3">
  148. <br/>
  149.  
  150. <h2> Unsubscribe </h2>
  151.  
  152. <br/>
  153.  
  154. <button onclick="" id="delete" type="button" class="btn btn-danger">Delete account</button>
  155.  
  156. </div>
  157.  
  158.  
  159. </div>
  160.  
  161. <br/>
  162. </div>
  163.  
  164.  
  165. <script src="https://code.jquery.com/jquery-3.2.1.min.js"
  166. integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
  167. crossorigin="anonymous"></script>
  168.  
  169. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js"
  170. integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"
  171. crossorigin="anonymous"></script>
  172. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"
  173. integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
  174. crossorigin="anonymous"></script>
  175.  
  176. <script src="https://cdnjs.cloudflare.com/ajax/libs/bootbox.js/4.4.0/bootbox.js"
  177. integrity="sha256-tcqPYPyxU+Fsv5sVdvnxLYJ7Jq9wWpi4twZbtZ0ubY8="
  178. crossorigin="anonymous"></script>
  179.  
  180. <script>
  181. document.getElementById("delete").onclick = function () {
  182. var r = confirm("Do you want to delete your account? This cannot be undone!");
  183. if (r === true) {
  184. location.href = "/profile/delete";
  185. }
  186. };
  187.  
  188. document.getElementById("logout").onclick = function () {
  189. location.href = "/logout";
  190. };
  191. </script>
  192.  
  193. </body>
  194.  
  195. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement