pull/6/head
ibuler 10 years ago
parent 3dca51d23c
commit 16a051f4a0

@ -189,7 +189,8 @@ def user_del(request):
def user_edit(request): def user_edit(request):
header_title, path1, path2 = '编辑用户 | Edit User', 'juser', 'user_edit' header_title, path1, path2 = '编辑用户 | Edit User', 'juser', 'user_edit'
disabled = 'disabled' hidden = "hidden"
li_class = "disabled"
if request.method == 'GET': if request.method == 'GET':
username = request.GET.get('username', None) username = request.GET.get('username', None)
if not username: if not username:
@ -366,6 +367,7 @@ def user_add(request):
header_title, path1, path2 = '添加用户 | Add User', 'juser', 'user_add' header_title, path1, path2 = '添加用户 | Add User', 'juser', 'user_add'
user_role = {'SU': u'超级管理员', 'GA': u'组管理员', 'CU': u'普通用户'} user_role = {'SU': u'超级管理员', 'GA': u'组管理员', 'CU': u'普通用户'}
all_group = UserGroup.objects.all() all_group = UserGroup.objects.all()
li_class = "hidden"
if request.method == 'POST': if request.method == 'POST':
username = request.POST.get('username', None) username = request.POST.get('username', None)
password = request.POST.get('password', None) password = request.POST.get('password', None)

@ -38,8 +38,13 @@
<div class="form-group"> <div class="form-group">
<label for="username" class="col-sm-2 control-label">用户名<span class="red-fonts">*</span></label> <label for="username" class="col-sm-2 control-label">用户名<span class="red-fonts">*</span></label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="username" name="username" placeholder="Username" type="text" class="form-control" value={{ username }} {{ disabled }}> <input id="username" name="username" placeholder="Username" type="text" class="form-control" value={{ username }} {{ hidden }}>
</div> </div>
<li role="tab" class="{{ li_class }}" aria-disabled="true">
<a id="form-t-1" href="#form-h-1" aria-controls="form-p-1">
<span class="number">{{ username }}</span>
</a>
</li>
</div> </div>
<div class="hr-line-dashed"></div> <div class="hr-line-dashed"></div>
<div class="form-group"> <div class="form-group">

Loading…
Cancel
Save