update.html

张创琦

  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8"/>
  5. <title>user</title>
  6. <link rel="stylesheet" th:href="@{/css/bootstrap.css}"></link>
  7. <script type="text/javascript" th:src="@{/js/My97DatePicker/WdatePicker.js}"></script>
  8. <script type="text/javascript" src="/js/My97DatePicker/lang/zh-cn.js"></script>
  9. </head>
  10. <body class="container">
  11. <br/>
  12. <h1>修改账单</h1>
  13. <br/><br/>
  14. <div class="with:80%">
  15. <form class="form-horizontal" th:action="@{/bill/update}" method="post" th:object="${bill}">
  16. <input type="hidden" name="id" th:value="*{id}"/>
  17. <div class="form-group">
  18. <label for="typeId" class="col-sm-2 control-label">类型</label>
  19. <div class="col-sm-10">
  20. <select name="typeId" id="typeId" class="form-control">
  21. <option th:each="t:${types}" th:value="${t.id}" th:text="${t.name}" th:selected="${t.id} == *{typeId}" ></option>
  22. </select>
  23. </div>
  24. </div>
  25. <div class="form-group">
  26. <label for="title" class="col-sm-2 control-label" >标题</label>
  27. <div class="col-sm-10">
  28. <input type="text" class="form-control" name="title" id="title" th:value="*{title}" placeholder="标题"/>
  29. </div>
  30. </div>
  31. <div class="form-group">
  32. <label for="billTime" class="col-sm-2 control-label">日期</label>
  33. <div class="col-sm-10">
  34. <input type="text" class="form-control" name="billTime" id="billTime" th:value="*{billTime} ? *{#dates.format(billTime, 'yyyy-MM-dd')}" placeholder="日期" onclick="WdatePicker()"/>
  35. </div>
  36. </div>
  37. <div class="form-group">
  38. <label for="price" class="col-sm-2 control-label">金额</label>
  39. <div class="col-sm-10">
  40. <input type="text" class="form-control" name="price" id="price" th:value="*{price}" placeholder="金额"/>
  41. </div>
  42. </div>
  43. <div class="form-group">
  44. <label for="explain" class="col-sm-2 control-label">说明</label>
  45. <div class="col-sm-10">
  46. <input type="text" class="form-control" name="explain" id="explain" th:value="*{explain}" placeholder="说明"/>
  47. </div>
  48. </div>
  49. <div class="form-group">
  50. <div class="col-sm-offset-2 col-sm-10">
  51. <input type="submit" value="保存" class="btn btn-info" /> &nbsp; &nbsp; &nbsp;
  52. <input type="reset" value="重置" class="btn btn-info" />
  53. </div>
  54. </div>
  55. </form>
  56. </div>
  57. </body>
  58. </html>