perf: 登录重置密码传输进行加密

pull/13451/head
gerry-fit 2024-06-19 14:29:36 +08:00 committed by Bryan
parent 4a520e9e10
commit 2977323800
1 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,9 @@
{% block custom_foot_js %}
<script type="text/javascript" src="{% static 'js/pwstrength-bootstrap.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/jsencrypt/jsencrypt.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/cryptojs/crypto-js.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/plugins/buffer/buffer.min.js' %}"></script>
<script>
$(document).ready(function () {
// 密码强度校验
@ -76,7 +79,8 @@ $(document).ready(function () {
checkPasswordRules(password, minLength);
})
$("form").submit(function(){
$("form").submit(function(event){
event.preventDefault()
// Let's find the input to check
var ids = ['id_new_password', 'id_confirm_password']
for (id of ids) {
@ -87,6 +91,7 @@ $(document).ready(function () {
passwordRef.val(value)
}
}
this.submit();
});
})
</script>