edit.html 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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-dict-edit" th:object="${dingTalksConfig}">
  9. <input name="id" type="hidden" th:field="*{id}" />
  10. <div class="form-group">
  11. <label for="type" class="col-sm-2 control-label">类型:</label>
  12. <div class="col-sm-10">
  13. <select name="type" id="type" class="form-control m-b" th:with="type=${@dict.getType('ding_talks_type')}">
  14. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{type}"></option>
  15. </select>
  16. </div>
  17. </div>
  18. <div class="form-group">
  19. <label class="col-sm-2 control-label">webHook:</label>
  20. <div class="col-sm-10">
  21. <input id="url" name="url" class="form-control" type="text" placeholder="请输入webHook地址" th:field="*{url}"/>
  22. </div>
  23. </div>
  24. <div class="form-group">
  25. <label class="col-sm-2 control-label">联系人(多个以英文逗号分割):</label>
  26. <div class="col-sm-10">
  27. <input id="mobiles" name="mobiles" class="form-control" type="text" placeholder="请输入联系人" th:field="*{mobiles}"/>
  28. </div>
  29. </div>
  30. <div class="form-group">
  31. <label class="col-sm-2 control-label">是否@所有人:</label>
  32. <div class="col-sm-3">
  33. <div class="radio-box">
  34. <input type="radio" id="atAll" name="atAll" value="1" th:field="*{atAll}">
  35. <label for="atAll">是</label>
  36. </div>
  37. <div class="radio-box">
  38. <input type="radio" id="atAll2" name="atAll" value="0" th:field="*{atAll}">
  39. <label for="atAll2">否</label>
  40. </div>
  41. </div>
  42. </div>
  43. </form>
  44. </div>
  45. <th:block th:include="include :: footer" />
  46. <script type="text/javascript">
  47. var prefix = ctx + "system/dingTalks";
  48. $("#form-dict-edit").validate({
  49. focusCleanup: true
  50. });
  51. function submitHandler() {
  52. if ($.validate.form()) {
  53. $.operate.save(prefix + "/edit", $('#form-dict-edit').serialize());
  54. }
  55. }
  56. </script>
  57. </body>
  58. </html>