hpBizParamForm.jsp 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <%@ page contentType="text/html;charset=UTF-8" %>
  2. <%@ include file="/webpage/include/taglib.jsp"%>
  3. <html>
  4. <head>
  5. <title>业务参数管理</title>
  6. <meta name="decorator" content="ani"/>
  7. <link href="${ctxStatic}/plugin/bootstrap/css/bootstrap-switch.min.css" rel="stylesheet">
  8. <script src="${ctxStatic}/plugin/bootstrap/js/bootstrap-switch.min.js"></script>
  9. <style>
  10. .headBottom{
  11. border-bottom:1px solid #ccc;
  12. font-size: 16px;
  13. color: rgba(0,0,0,.85);
  14. padding-bottom: 6px;
  15. }
  16. .form-group {
  17. margin-bottom: 25px !important;
  18. }
  19. </style>
  20. <script type="text/javascript">
  21. $(document).ready(function() {
  22. $("label[name='onoffswitch']").on('click',function (e) {
  23. var onswitch= document.getElementById("onoffswitch").checked;
  24. if (onswitch) {
  25. $('#shareFlag').val(0)
  26. jp.info("关闭");
  27. }
  28. else {
  29. $('#shareFlag').val(1)
  30. jp.info("开启");
  31. }
  32. });
  33. jp.ajaxForm("#inputForm",function(data){
  34. if(data.success){
  35. jp.success(data.msg);
  36. jp.go("${ctx}/hpmessage/hpBizParam/form");
  37. }else{
  38. jp.error(data.msg);
  39. $("#inputForm").find("button:submit").button("reset");
  40. }
  41. });
  42. });
  43. </script>
  44. </head>
  45. <body>
  46. <div class="wrapper wrapper-content">
  47. <div class="row">
  48. <div class="col-md-12">
  49. <div class="panel panel-primary">
  50. <div class="panel-body">
  51. <form:form id="inputForm" modelAttribute="hpBizParam" action="${ctx}/hpmessage/hpBizParam/save" method="post" class="form-horizontal">
  52. <form:hidden path="id"/>
  53. <div class="form-group col-sm-12 headBottom">业务参数配置</div>
  54. <div class="form-group">
  55. <label class="col-sm-2 control-label">小程序分享:</label>
  56. <div class="col-sm-6">
  57. <div class="onoffswitch">
  58. <input type="hidden" name="shareFlag" id="shareFlag" value="${hpBizParam.shareFlag}">
  59. <c:choose>
  60. <c:when test="${hpBizParam.shareFlag==null}">
  61. <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="onoffswitch">
  62. <label class="onoffswitch-label" for="onoffswitch" name="onoffswitch">
  63. <span class="onoffswitch-inner"></span>
  64. <span class="onoffswitch-switch"></span>
  65. </label>
  66. </c:when>
  67. <c:otherwise>
  68. <input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="onoffswitch" ${hpBizParam.shareFlag=="1"?"checked":""}>
  69. <label class="onoffswitch-label" for="onoffswitch" name="onoffswitch">
  70. <span class="onoffswitch-inner"></span>
  71. <span class="onoffswitch-switch"></span>
  72. </label>
  73. </c:otherwise>
  74. </c:choose>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="form-group">
  79. <label class="col-sm-2 control-label">小程序原始id:</label>
  80. <div class="col-sm-6">
  81. <form:input path="gdId" htmlEscape="false" maxlength="100" class="form-control required" placeholder="小程序原始id"/>
  82. <span class="help-block">应用于app内分享接口</span>
  83. </div>
  84. </div>
  85. <div class="col-sm-3" ></div>
  86. <div class="col-sm-6" style="padding-top: 20%">
  87. <div class="form-group text-center">
  88. <div>
  89. <button class="btn btn-primary btn-block btn-sm btn-parsley" data-loading-text="正在提交...">保 存</button>
  90. </div>
  91. </div>
  92. </div>
  93. </form:form>
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </body>
  100. </html>