<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>
|