mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-05-14 02:35:36 +00:00
- 更改了资产表单,影响
- 资产创建和更新
- 增加了资产平台数据库,影响
- 平台创建更新和删除
- 更改了资产的platform字段,又一个字符字段,改为一个外键,影响
- 资产创建和更新
- 资产连接 [windows,linux]
- 测试连接等ansible任务
- 自动化云导入
- 更改了资产的序列化器,影响
- 资产创建更新列表
- 统一了树列表基础模板,影响
- 资产列表页,权限列表页,vault页,资产收集页
- 统一了导入导出组件,影响
- 资产导入导出
- 用户导入导出
- 用户组导入导出
- 系统用户导入导出
- 管理用户导入导出
- vault导出导出
- 收集用户列表导入导出
- 修改用户更新密码信号,影响
- 修改用户密码产生的改密日志
- 新增Model instance序列化工具函数,影响
- 操作日志生成
- 修改api mixin,新增 serializer_classes字段,serializer_classes = {"default": "", "display": "", "list": .., "other_action": ""}, 根据用户请求的方式返回不同的serializer_class,影响
- 用户的viewset
- 资产权限的viewset
- 统一系统配置中的tab切换
- 统一没有nav的页面,影响
- 重置密码
- 忘记密码
- 重置中设置密码
- 独立的message页面
- 修改用户组列表页,不再返还用户组下的用户,仅有数量
- 组织的一些方法变为layzproperty,避免重复计算
- 修改用户组详情页,影响
- 用户组增加删除用户
81 lines
3.0 KiB
Python
81 lines
3.0 KiB
Python
{% extends '_base_only_content.html' %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
{% load bootstrap3 %}
|
|
{% block html_title %}{% trans 'Reset password' %}{% endblock %}
|
|
{% block title %}{% trans 'Reset password' %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<form class="m-t" role="form" method="post" action="">
|
|
{% csrf_token %}
|
|
{% if errors %}
|
|
<p class="red-fonts">{{ errors }}</p>
|
|
{% endif %}
|
|
{% if not token_invalid %}
|
|
<div class="form-group">
|
|
{% bootstrap_field form.new_password %}
|
|
{% bootstrap_field form.confirm_password %}
|
|
{# 密码popover #}
|
|
<div id="container">
|
|
<div class="popover fade bottom in" role="tooltip" id="popover777" style=" display: none; width:260px;">
|
|
<div class="arrow" style="left: 50%;"></div>
|
|
<h3 class="popover-title" style="display: none;"></h3>
|
|
<h4>{% trans 'Your password must satisfy' %}</h4><div id="id_password_rules" style="color: #908a8a; margin-left:20px; font-size:15px;"></div>
|
|
<h4 style="margin-top: 10px;">{% trans 'Password strength' %}</h4><div id="id_progress"></div>
|
|
<div class="popover-content"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<button type="submit" class="btn btn-primary block full-width m-b">{% trans "Setting" %}</button>
|
|
{% endif %}
|
|
</form>
|
|
{% endblock %}
|
|
|
|
{% block custom_foot_js %}
|
|
<script type="text/javascript" src="{% static 'js/pwstrength-bootstrap.js' %}"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
// 密码强度校验
|
|
var el = $('#id_password_rules'),
|
|
idPassword = $('#id_new_password'),
|
|
idPopover = $('#popover777'),
|
|
container = $('#container'),
|
|
progress = $('#id_progress'),
|
|
password_check_rules = {{ password_check_rules|safe }},
|
|
minLength = 6,
|
|
top = 146, left = 170,
|
|
i18n_fallback = {
|
|
"veryWeak": "{% trans 'Very weak' %}",
|
|
"weak": "{% trans 'Weak' %}",
|
|
"normal": "{% trans 'Normal' %}",
|
|
"medium": "{% trans 'Medium' %}",
|
|
"strong": "{% trans 'Strong' %}",
|
|
"veryStrong": "{% trans 'Very strong' %}"
|
|
};
|
|
|
|
jQuery.each(password_check_rules, function (idx, rules) {
|
|
if(rules.key === 'id_security_password_min_length'){
|
|
minLength = rules.value
|
|
}
|
|
});
|
|
|
|
// 初始化popover
|
|
initPopover(container, progress, idPassword, el, password_check_rules, i18n_fallback);
|
|
|
|
// 监听事件
|
|
idPassword.on('focus', function () {
|
|
idPopover.css('top', top);
|
|
idPopover.css('left', left);
|
|
idPopover.css('display', 'block');
|
|
});
|
|
idPassword.on('blur', function () {
|
|
idPopover.css('display', 'none');
|
|
});
|
|
idPassword.on('keyup', function(){
|
|
var password = idPassword.val();
|
|
checkPasswordRules(password, minLength);
|
|
})
|
|
})
|
|
</script>
|
|
{% endblock %}
|