link_add.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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. <div class="row cl">
  12. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>链接名:</label>
  13. <div class="formControls col-xs-8 col-sm-9">
  14. <input type="text" class="input-text" required value="" th:id="name" th:name="name"/>
  15. </div>
  16. </div>
  17. <div class="row cl">
  18. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>链接地址:</label>
  19. <div class="formControls col-xs-8 col-sm-9">
  20. <input type="text" class="input-text" required value="http://" placeholder="请输入完整网站地址,如:https://www.baidu.com;http://www.qq.com" th:id="link_location" th:name="link_location"/>
  21. </div>
  22. </div>
  23. <!-- <div class="row cl">
  24. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>网站图标:</label>
  25. <div class="formControls col-xs-8 col-sm-9">
  26. <input type="text" class="input-text" required value="" th:id="link_location" th:name="link_location"/>
  27. <div class="uploader-thum-container">
  28. <div id="fileList" class="uploader-list"></div>
  29. <div id="filePicker" class="margin-right-10">选择图片</div>
  30. <input type="hidden" value="" th:id="img" th:name="img"/>
  31. <div id="fileListPre"></div>
  32. </div>
  33. </div>
  34. </div> -->
  35. <div class="row cl">
  36. <label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>显示顺序:</label>
  37. <div class="formControls col-xs-8 col-sm-9">
  38. <input type="number" class="input-text" required value="1" th:id="sort" th:name="sort"/>
  39. </div>
  40. </div>
  41. <div class="row cl">
  42. <label class="form-label col-xs-4 col-sm-2"><span>状态:</span></label>
  43. <div class="formControls col-xs-8 col-sm-9">
  44. <input type="radio" name="is_start" checked value="true">启用</input>
  45. <input type="radio" name="is_start" value="false">禁用</input>
  46. </div>
  47. </div>
  48. <div class="row cl">
  49. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  50. <button class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i>保存</button>
  51. <!--<button onClick="article_save();" class="btn btn-secondary radius" type="button"><i-->
  52. <!--class="Hui-iconfont">&#xe632;</i> 保存草稿-->
  53. <!--</button>-->
  54. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  55. </div>
  56. </div>
  57. </form>
  58. </article>
  59. <script type="text/javascript" th:src="@{/js/government/link/link_add.js}"></script>
  60. <script th:inline="javascript">
  61. $(function () {
  62. // 初始化图片上传
  63. var options = {
  64. auto: false,
  65. uploadBtnId: '#filePicker',
  66. picturePreId: 'fileListPre',
  67. hiddenPictureUrl: 'fileDown.file_id',
  68. hiddenPictureName: 'imgName',
  69. accept: {
  70. title: 'Images',
  71. extensions: 'gif,jpg,jpeg,bmp,png',
  72. mimeTypes: 'image/gif,image/jpg,image/jpeg,image/bmp,image/png'
  73. },
  74. fileSizeLimit: 100 * 1024 * 1024,
  75. fileSingleSizeLimit: 100 * 1024 * 1024
  76. // fileNumLimit: 1
  77. };
  78. var webUploadPicture = new $WebUploadPicture(options);
  79. webUploadPicture.init();
  80. });
  81. /**
  82. * 取消
  83. */
  84. function removeIframe() {
  85. var index = parent.layer.getFrameIndex(window.name);
  86. parent.layer.close(index);
  87. }
  88. </script>
  89. </body>
  90. </html>