build_edit.html 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>新增园区</title>
  7. </head>
  8. <body layout:fragment="content">
  9. <article class="page-container">
  10. <form class="form form-horizontal" id="form-slides-add">
  11. <input type="hidden" th:name="id" th:id="id" th:value="${build.id}"/>
  12. <div class="row cl">
  13. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>所属街道:</label>
  14. <div class="formControls col-xs-8 col-sm-9">
  15. <span class="select-box">
  16. <input type="hidden" name="street_name"/>
  17. <select th:id="street_id" class="select" th:name="street_id" onchange="getName(this);">
  18. <option value="">--请选择--</option>
  19. <option value="" th:if="${item.is_start}" th:selected="${build.street_id==item.id}" th:each="item : ${streeList}" th:value="${item.id}" th:text="${item.name}">
  20. <option value="" th:unless="${item.is_start}" disabled th:selected="${build.street_id==item.id}" th:each="item : ${streeList}" th:value="${item.id}" th:text="${item.name}">
  21. </option>
  22. </select>
  23. </span>
  24. </div>
  25. </div>
  26. <div class="row cl">
  27. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>园区名称:</label>
  28. <div class="formControls col-xs-8 col-sm-9">
  29. <input type="text" class="input-text" required value="" th:value="${build.name}" th:id="name" th:name="name"/>
  30. </div>
  31. </div>
  32. <div class="row cl">
  33. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>园区位置:</label>
  34. <div class="formControls col-xs-8 col-sm-9">
  35. <input type="text" class="input-text" required value="" th:value="${build.location}" th:id="location" th:name="location"/>
  36. </div>
  37. </div>
  38. <div class="row cl">
  39. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>园区类型:</label>
  40. <div class="formControls col-xs-8 col-sm-9">
  41. <span class="select-box">
  42. <select th:id="type" class="select" th:name="type" >
  43. <option value="">--请选择--</option>
  44. <option value="" th:selected="${build.type==item.id}" th:each="item : ${buildTypeList}" th:value="${item.id}" th:text="${item.type}">
  45. </option>
  46. </select>
  47. </span>
  48. </div>
  49. </div>
  50. <div class="row cl">
  51. <label class="form-label col-xs-4 col-sm-2"><span>状态:</span></label>
  52. <div class="formControls col-xs-8 col-sm-9">
  53. <input type="radio" name="is_start" th:checked="${build.is_start==true}" value="true">启用</input>
  54. <input type="radio" name="is_start" th:checked="${build.is_start==false}" value="false">禁用</input>
  55. </div>
  56. </div>
  57. <div class="row cl">
  58. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  59. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>保存</button>
  60. <!--<button onClick="article_save();" class="btn btn-secondary radius" type="button"><i-->
  61. <!--class="Hui-iconfont">&#xe632;</i> 保存草稿-->
  62. <!--</button>-->
  63. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  64. </div>
  65. </div>
  66. </form>
  67. </article>
  68. <script type="text/javascript" th:src="@{/js/super/build_add.js}"></script>
  69. <script th:inline="javascript">
  70. /**
  71. * 取消
  72. */
  73. function removeIframe() {
  74. var index = parent.layer.getFrameIndex(window.name);
  75. parent.layer.close(index);
  76. }
  77. function getName(obj) {
  78. $("input[name='street_name']").val($(obj).find("option:selected").text());
  79. }
  80. </script>
  81. </body>
  82. </html>