1
13693261870
2022-09-16 58d012f11dd34564d81b4eb3a6099eb689876597
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<script th:inline="javascript">
    /*<![CDATA[*/
 
    var policyPattern =
        /^.*(?=.{8,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*?.]).*$/;
    /*[[${policyPattern}]]*/ ;
    
    /*]]>*/
    $(document).ready(function(){
         $("#passwordManagementForm").submit(function(){
        var pattern=/^.*(?=.{8,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*?.]).*$/;
            var Password = document.getElementById("password").value;
            if (Password.length <= 0) 
            {
                alert("密码不能为空!");
                return false;
            }
            if (!pattern.test(Password)) 
            {
                alert("密码格式不符合!请重新输入");
                return false;
            }
            
            var confirmedPassword = document.getElementById("confirmedPassword").value;
            if (confirmedPassword.length <= 0) 
            {
                alert("确认密码不能为空!");
                return false;
            }
            if(Password!=confirmedPassword){
                 alert("两次密码不一致!");
                    return false;
            }
            return true;
            
    })
    })
   
    
    
    
</script>
 
<div class="alert alert-info">
<div stytle="text-align:center; width: 100%;display:flex;justify-content:center;color:#157de7;">
<div style="width: 100%;text-align: center;font-size: 18px;color: black"><span th:utext="#{screen.mustchangepass.heading}"></span> </div>
</div>
    <!-- <p/> -->
    <!-- <br/> -->
    <form id="passwordManagementForm" th:if="true" method="post" th:object="${checkpass}">
        <!-- <p> -->
 
        <div class="alert alert-danger" th:if="${#fields.hasErrors('*')}">
            <span th:each="err : ${#fields.errors('*')}" th:utext="${err}"/>
        </div>
 
        <table>
            <tr>
                <td class="pm">
                    <label for="password">请输入密码:</label>
                </td>
                <td class="pm">
                    <input class="required" type="password" id="password" th:field="*{password}"/>
                </td>
            </tr>
            <tr>
                <td class="pm">
                    <label for="confirmedPassword">请确认密码:</label>
                </td>
                <td class="pm">
                    <input class="required" type="password" id="confirmedPassword" th:field="*{confirmedPassword}" />
                </td>
            </tr>
        </table>
 
    <!--     <div>
            <br/>
            <meter max="4" id="password-strength-meter"/>
        </div> -->
        </p>
        <p id="password-strength-text"></p>
        <style>
        .btn-success{
        margin-right:6px;
        }
        .alert-danger{
       visibility: hidden;
        }
        .required{
        width:270px;
        margin-left:10px
        
        }
        label{
            font-size: 18px;
            font-weight: 400;
            color: black
        }
        input{
        width:80px;
        border-radius: 6px;
        outline: none;
        border: solid 1px gray;
        height: 40px
              }
        table{
        margin:0 auto;
        }
        tr{
        margin:20px 0;
        display:block;
        
        }
        .alert{
            font-family: consolas,微软雅黑;
                box-shadow: 5px 5px 15px rgba(0 ,0 ,0,.6 );
                background-color: whitesmoke;border: none;
                position: absolute;
                top: 50%;
                left: 50%;
                height: 300px;
                /*margin: 0 auto;*/
                transform: translate(-50%,-50%);
}
 
 
        }
        .btn-reset,.btn-success{
          text-align:center
        
        }
        .submitbox{
        width:100%;
        min-heihgt:50px;
        padding-left: 70px;
        display: flex;
        align-items: center;
        justify-content: center;
        }
        #submit{
        background:#157de7;
        width: 120px;
         border: solid 1px #1e9fff!important;
        }
        .btn-reset{
        border: solid 1px #1e9fff!important;
 
            width: 120px;
            margin-left: 5px
        }
        .pm{
 
        }
        </style>
        <input type="hidden" name="execution" th:value="${flowExecutionKey}"/>
        <input type="hidden" name="_eventId" value="submit"/>
      <div class="submitbox">
        <input class="btn btn-success"
               name="提交"
               accesskey="s"
               th:value="#{screen.pm.button.submit}"
               id="submit"
               type="submit"/>
        <input
                class="btn-reset"
                name="取消"
                accesskey="c"
                th:value="#{screen.pm.button.cancel}"
                type="button"
                onclick="location.href = location.href;"/>
      </div>
    </form>
    <p th:unless="true" th:utext="#{screen.mustchangepass.message}"/>
</div>