mirror of https://github.com/jumpserver/jumpserver
修改bug
parent
d0a5274214
commit
9191d3b6e5
|
@ -540,7 +540,7 @@ def addGroup(request):
|
||||||
else:
|
else:
|
||||||
error = u'不能为空'
|
error = u'不能为空'
|
||||||
return render_to_response('addGroup.html',
|
return render_to_response('addGroup.html',
|
||||||
{'error': error, 'msg': msg},
|
{'error': error, 'msg': msg, 'user_menu': 'active'},
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
@ -559,7 +559,7 @@ def showGroup(request):
|
||||||
else:
|
else:
|
||||||
error = '请选择删除的组'
|
error = '请选择删除的组'
|
||||||
|
|
||||||
return render_to_response('showGroup.html', {'error': error, 'msg': msg, 'groups': groups},
|
return render_to_response('showGroup.html', {'error': error, 'msg': msg, 'groups': groups, 'user_menu': 'active'},
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ def chgGroup(request):
|
||||||
group.save()
|
group.save()
|
||||||
msg = u'修改成功'
|
msg = u'修改成功'
|
||||||
|
|
||||||
return render_to_response('chgGroup.html', {'group': group, 'error': error, 'msg': msg},
|
return render_to_response('chgGroup.html', {'group': group, 'error': error, 'msg': msg, 'user_menu': 'active'},
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
|
|
||||||
|
|
||||||
|
@ -723,7 +723,7 @@ def chgPass(request):
|
||||||
is_self = True
|
is_self = True
|
||||||
|
|
||||||
return render_to_response('chgPass.html',
|
return render_to_response('chgPass.html',
|
||||||
{'username': username, 'is_self': is_self},
|
{'username': username, 'is_self': is_self, 'user_menu': 'active'},
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
else:
|
else:
|
||||||
username = request.POST.get('username')
|
username = request.POST.get('username')
|
||||||
|
@ -763,7 +763,7 @@ def chgKey(request):
|
||||||
is_self = True
|
is_self = True
|
||||||
|
|
||||||
return render_to_response('chgKey.html',
|
return render_to_response('chgKey.html',
|
||||||
{'username': username, 'is_self': is_self},
|
{'username': username, 'is_self': is_self, 'user_menu': 'active'},
|
||||||
context_instance=RequestContext(request))
|
context_instance=RequestContext(request))
|
||||||
else:
|
else:
|
||||||
username = request.POST.get('username')
|
username = request.POST.get('username')
|
||||||
|
@ -788,7 +788,7 @@ def chgKey(request):
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
error = '更改私钥密码错误'
|
error = '更改私钥密码错误'
|
||||||
return render_to_response('info.hmtl', {'error': error})
|
return render_to_response('info.hmtl', {'error': error})
|
||||||
user['keypass'] = password
|
user.key_pass = password
|
||||||
user.save()
|
user.save()
|
||||||
|
|
||||||
return render_to_response('info.html', {'msg': '修改密码成功'})
|
return render_to_response('info.html', {'msg': '修改密码成功'})
|
||||||
|
|
|
@ -13,6 +13,12 @@
|
||||||
{{ msg }}
|
{{ msg }}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="username" class="col-sm-2 control-label">用户名<span style="color: red"> *</span></label>
|
||||||
|
<div class="col-sm-4">
|
||||||
|
<input type="text" class="form-control" id="username" name="username" placeholder="用户名" value="{{ username }}" readonly="readOnly">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{% if is_self %}
|
{% if is_self %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="oldpass" class="col-sm-2 control-label">原来的密码<span style="color: red"> *</span></label>
|
<label for="oldpass" class="col-sm-2 control-label">原来的密码<span style="color: red"> *</span></label>
|
||||||
|
|
|
@ -6,15 +6,12 @@
|
||||||
<title>信息</title>
|
<title>信息</title>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
body{
|
|
||||||
font-family:"Hiragino Sans GB W3", "微软雅黑", "Helvetica Neue", Helvetica, Arial, "宋体", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
var i=2;
|
var i=2;
|
||||||
window.setInterval("settime()",1000);
|
window.setInterval("settime()",1000);
|
||||||
window.setTimeout("toload()",3000);
|
window.setTimeout("toload()",5000);
|
||||||
function settime(){
|
function settime(){
|
||||||
var divinner=document.getElementById("settime");
|
var divinner=document.getElementById("settime");
|
||||||
divinner.innerText=i;
|
divinner.innerText=i;
|
||||||
|
|
Loading…
Reference in New Issue