add.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
  3. <head>
  4. <th:block th:include="include :: header('新增猜拳奖励')" />
  5. </head>
  6. <body class="white-bg">
  7. <div class="wrapper wrapper-content animated fadeInRight ibox-content">
  8. <form class="form-horizontal m" id="form-notice-add">
  9. <div class="form-group">
  10. <label for="giftId" class="col-sm-2 control-label">礼物1:</label>
  11. <div class="col-sm-3">
  12. <select name="giftId" id="giftId" th:with="type=${gifts}">
  13. <option th:each="gift : ${type}" th:text="${gift.giftName}" th:value="${gift.giftId}"></option>
  14. </select>
  15. </div>
  16. <label class="col-sm-2 control-label">数量:</label>
  17. <div class="col-sm-3">
  18. <input name="num" class="form-control" type="text" placeholder="请输入数量" required/>
  19. </div>
  20. </div>
  21. <div class="form-group">
  22. <label for="giftId2" class="col-sm-2 control-label">礼物2:</label>
  23. <div class="col-sm-3">
  24. <select name="giftId" id="giftId2" th:with="type=${gifts}">
  25. <option th:each="gift : ${type}" th:text="${gift.giftName}" th:value="${gift.giftId}"></option>
  26. </select>
  27. </div>
  28. <label class="col-sm-2 control-label">数量:</label>
  29. <div class="col-sm-3">
  30. <input name="num" class="form-control" type="text" placeholder="请输入数量" required/>
  31. </div>
  32. </div>
  33. <div class="form-group">
  34. <label for="giftId3" class="col-sm-2 control-label">礼物1:</label>
  35. <div class="col-sm-3">
  36. <select name="giftId" id="giftId3" th:with="type=${gifts}">
  37. <option th:each="gift : ${type}" th:text="${gift.giftName}" th:value="${gift.giftId}"></option>
  38. </select>
  39. </div>
  40. <label class="col-sm-2 control-label">数量:</label>
  41. <div class="col-sm-3">
  42. <input name="num" class="form-control" type="text" placeholder="请输入数量" required/>
  43. </div>
  44. </div>
  45. <div class="form-group">
  46. <label for="probability" class="col-sm-2 control-label">概率:</label>
  47. <div class="col-sm-10">
  48. <select name="probability" id="probability" class="form-control m-b" th:with="type=${@dict.getType('probability_type')}">
  49. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  50. </select>
  51. </div>
  52. </div>
  53. <div class="form-group">
  54. <label class="col-sm-2 control-label">展示等级:</label>
  55. <div class="col-sm-10">
  56. <input name="grade" class="form-control" type="number" min="1" placeholder="请输入展示等级" required/>
  57. </div>
  58. </div>
  59. </form>
  60. </div>
  61. <th:block th:include="include :: footer" />
  62. <th:block th:include="include :: summernote-js" />
  63. <script type="text/javascript">
  64. var prefix = ctx + "room/mora/reward";
  65. $("#form-notice-add").validate({
  66. focusCleanup: true
  67. });
  68. function submitHandler() {
  69. if ($.validate.form()) {
  70. $.operate.save(prefix + "/add", $('#form-notice-add').serialize());
  71. }
  72. }
  73. </script>
  74. </body>
  75. </html>