From 9191d3b6e55fefcc7d38974482b1cab928d53e8d Mon Sep 17 00:00:00 2001 From: guanghongwei Date: Fri, 3 Oct 2014 23:06:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=87=EE=86=BD=E6=95=BCbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webroot/AutoSa/AutoSa/views.py | 12 ++++++------ webroot/AutoSa/templates/chgPass.html | 6 ++++++ webroot/AutoSa/templates/info.html | 5 +---- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/webroot/AutoSa/AutoSa/views.py b/webroot/AutoSa/AutoSa/views.py index cfbade2c8..4eaf71de2 100644 --- a/webroot/AutoSa/AutoSa/views.py +++ b/webroot/AutoSa/AutoSa/views.py @@ -540,7 +540,7 @@ def addGroup(request): else: error = u'不能为空' return render_to_response('addGroup.html', - {'error': error, 'msg': msg}, + {'error': error, 'msg': msg, 'user_menu': 'active'}, context_instance=RequestContext(request)) @@ -559,7 +559,7 @@ def showGroup(request): else: 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)) @@ -581,7 +581,7 @@ def chgGroup(request): group.save() 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)) @@ -723,7 +723,7 @@ def chgPass(request): is_self = True 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)) else: username = request.POST.get('username') @@ -763,7 +763,7 @@ def chgKey(request): is_self = True 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)) else: username = request.POST.get('username') @@ -788,7 +788,7 @@ def chgKey(request): if ret != 0: error = '更改私钥密码错误' return render_to_response('info.hmtl', {'error': error}) - user['keypass'] = password + user.key_pass = password user.save() return render_to_response('info.html', {'msg': '修改密码成功'}) diff --git a/webroot/AutoSa/templates/chgPass.html b/webroot/AutoSa/templates/chgPass.html index d365acc37..4ddfbfadf 100644 --- a/webroot/AutoSa/templates/chgPass.html +++ b/webroot/AutoSa/templates/chgPass.html @@ -13,6 +13,12 @@ {{ msg }} {% endif %} +
+ +
+ +
+
{% if is_self %}
diff --git a/webroot/AutoSa/templates/info.html b/webroot/AutoSa/templates/info.html index c5f547901..cc3e2fbb4 100644 --- a/webroot/AutoSa/templates/info.html +++ b/webroot/AutoSa/templates/info.html @@ -6,15 +6,12 @@ 信息