liuxiaolong
2019-05-09 0d1d88cdb668e75ea8609417ac18ae19947e9525
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp"%>
<html>
<head>
    <title>系统配置管理</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
    $(document).ready(function(){
 
        $("#inputForm").validate({  
            rules: {  
            mailName: {  
        required: true,  
        email: true  
       }}});
 
 
    });
    function modifyMail(){
        if($("#inputForm").valid() == false){
            return;
        }
        $.ajax({
            async: false,
            url: "${ctx}/sys/systemConfig/save",
            data:{"smtp":$("#smtp").val(),"port":$("#port").val(),"mailName":$("#mailName").val(),"mailPassword":$("#mailPassword").val()},
            dataType: "json",
            success: function (data) {
                if(data.success){
                    top.layer.alert("更新成功!");
                }else{
                    top.layer.alert("更新失败!");
                }
            }
        });
    }
 
    function modifySms(){
        $.ajax({
            async: false,
            url: "${ctx}/sys/systemConfig/save",
            data:{"smsName":$("#smsName").val(),"smsPassword":$("#smsPassword").val()},
            dataType: "json",
            success: function (data) {
                if(data.success){
                    top.layer.alert("更新成功!");
                }else{
                    top.layer.alert("更新失败!");
                }
            }
        });
    }
    </script>
</head>
<body>
        
        <div class="wrapper wrapper-content">
            <div class="row animated fadeInRight">
                <div class="col-sm-5">
                    
                <form:form id="inputForm" modelAttribute="systemConfig" action="${ctx}/sys/systemConfig/save" method="post" class="form-horizontal">
                      <div class="panel panel-success">
                           <div class="panel-heading">
                                        <i class="fa fa-envelope"></i> 系统邮箱设置 
                                   <div class="pull-right">
                                    <a href="#" onclick="modifyMail()" style="color:white">
                                        <i style="font-size: 20px" class="fa  fa-save"></i>
                                    </a>
                                </div>
                           </div>
                           <div class="panel-body">
                                <table class="table table-striped">
                                   <tbody>
                                        <tr>
                                            <td class="width-15"><label class="pull-right">邮箱服务器地址:</label></td>
                                            <td class="width-35">
                                                <form:input path="smtp" htmlEscape="false" maxlength="64" class="form-control "/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="width-15"><label class="pull-right">邮箱服务器端口:</label></td>
                                            <td class="width-35">
                                                <form:input path="port" htmlEscape="false" maxlength="64" class="form-control "/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="width-15"><label class="pull-right">系统邮箱地址:</label></td>
                                            <td class="width-35">
                                                <form:input path="mailName" htmlEscape="false" maxlength="64" class="form-control "/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="width-15"><label class="pull-right">系统邮箱密码:</label></td>
                                            <td class="width-35">
                                                <form:password path="mailPassword" htmlEscape="false" maxlength="64" class="form-control required"/>
                                            </td>
                                        </tr>
                                     </tbody>
                            </table>
                            </div>
                    </div>
 
            </form:form>
                    
        </div>
        <div class="col-sm-5">
            <form:form id="inputForm1" modelAttribute="systemConfig" action="${ctx}/sys/systemConfig/save" method="post" class="form-horizontal">
                      <div class="panel panel-success">
                          <div class="panel-heading">
                            <i class="fa fa-comment"></i> 短信设置(<a href="http://www.cnsms.cn/" target="_blank"><font color="white">企信通</font></a>)
                              <div class="pull-right">
                                    <a href="#" onclick="modifySms()" style="color:white">
                                        <i style="font-size: 20px" class="fa  fa-save"></i>
                                    </a>
                                </div>
                          </div>
                          <div class="panel-body">
                             <table class="table table-striped">
                                        <tr>
                                            <td class="width-15"><label class="pull-right">短信用户名:</label></td>
                                            <td class="width-35">
                                                <form:input path="smsName" htmlEscape="false" maxlength="64" class="form-control "/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="width-15"><label class="pull-right">短信密码:</label></td>
                                            <td class="width-35">
                                                <form:input path="smsPassword" htmlEscape="false" maxlength="64" class="form-control "/>
                                            </td>
                                        </tr>
                                </table>
                             </div>
                         </div>
            
                </form:form>
        </div>
    </div>
</body>
</html>