Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
967491fb
Unverified
Commit
967491fb
authored
Apr 19, 2018
by
老广
Committed by
GitHub
Apr 19, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1220 from jumpserver/dev
[Update] 修改用户详情,自己更改自己otp,提示小写
parents
910f3cdd
9ac7f26c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
31 deletions
+40
-31
django.mo
apps/i18n/zh/LC_MESSAGES/django.mo
+0
-0
django.po
apps/i18n/zh/LC_MESSAGES/django.po
+34
-30
user_detail.html
apps/users/templates/users/user_detail.html
+6
-1
No files found.
apps/i18n/zh/LC_MESSAGES/django.mo
View file @
967491fb
No preview for this file type
apps/i18n/zh/LC_MESSAGES/django.po
View file @
967491fb
...
...
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Jumpserver 0.3.3\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-04-19 1
2:44
+0800\n"
"POT-Creation-Date: 2018-04-19 1
7:48
+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: ibuler <ibuler@qq.com>\n"
"Language-Team: Jumpserver team<ibuler@qq.com>\n"
...
...
@@ -788,9 +788,9 @@ msgstr "选择节点"
#: assets/templates/assets/system_user_detail.html:183
#: assets/templates/assets/system_user_list.html:138 templates/_modal.html:22
#: terminal/templates/terminal/session_detail.html:108
#: users/templates/users/user_detail.html:3
57
#: users/templates/users/user_detail.html:38
2
#: users/templates/users/user_detail.html:4
05
#: users/templates/users/user_detail.html:3
62
#: users/templates/users/user_detail.html:38
7
#: users/templates/users/user_detail.html:4
10
#: users/templates/users/user_group_create_update.html:32
#: users/templates/users/user_group_list.html:86
#: users/templates/users/user_list.html:196
...
...
@@ -883,7 +883,7 @@ msgstr "刷新"
#: assets/templates/assets/asset_detail.html:300
#: users/templates/users/user_detail.html:282
#: users/templates/users/user_detail.html:30
4
#: users/templates/users/user_detail.html:30
9
msgid "Update successfully!"
msgstr "更新成功"
...
...
@@ -971,8 +971,8 @@ msgstr "存在资产,不能删除"
#: assets/templates/assets/asset_list.html:595
#: assets/templates/assets/system_user_list.html:133
#: users/templates/users/user_detail.html:35
2
#: users/templates/users/user_detail.html:3
77
#: users/templates/users/user_detail.html:35
7
#: users/templates/users/user_detail.html:3
82
#: users/templates/users/user_group_list.html:81
#: users/templates/users/user_list.html:191
msgid "Are you sure?"
...
...
@@ -2471,7 +2471,7 @@ msgid "Can't provide security? Please contact the administrator!"
msgstr "如果不能提供OTP验证码,请联系管理员!"
#: users/templates/users/reset_password.html:45
#: users/templates/users/user_detail.html:34
3 users/utils.py:72
#: users/templates/users/user_detail.html:34
8 users/utils.py:73
msgid "Reset password"
msgstr "重置密码"
...
...
@@ -2535,35 +2535,39 @@ msgstr "发送"
msgid "Send reset ssh key mail"
msgstr "发送重置密钥邮件"
#: users/templates/users/user_detail.html:342
#: users/templates/users/user_detail.html:291
msgid "Goto profile page enable otp"
msgstr "请去个人信息页面启用自己的OTP"
#: users/templates/users/user_detail.html:347
msgid "An e-mail has been sent to the user`s mailbox."
msgstr "已发送邮件到用户邮箱"
#: users/templates/users/user_detail.html:35
3
#: users/templates/users/user_detail.html:35
8
msgid "This will reset the user password and send a reset mail"
msgstr "将失效用户当前密码,并发送重设密码邮件到用户邮箱"
#: users/templates/users/user_detail.html:3
67
#: users/templates/users/user_detail.html:3
72
msgid ""
"The reset-ssh-public-key E-mail has been sent successfully. Please inform "
"the user to update his new ssh public key."
msgstr "重设密钥邮件将会发送到用户邮箱"
#: users/templates/users/user_detail.html:3
68
#: users/templates/users/user_detail.html:3
73
msgid "Reset SSH public key"
msgstr "重置SSH密钥"
#: users/templates/users/user_detail.html:3
78
#: users/templates/users/user_detail.html:3
83
msgid "This will reset the user public key and send a reset mail"
msgstr "将会失效用户当前密钥,并发送重置邮件到用户邮箱"
#: users/templates/users/user_detail.html:
395
#: users/templates/users/user_detail.html:
400
#: users/templates/users/user_profile.html:203
msgid "Successfully updated the SSH public key."
msgstr "更新ssh密钥成功"
#: users/templates/users/user_detail.html:
396
#: users/templates/users/user_detail.html:40
0
#: users/templates/users/user_detail.html:
401
#: users/templates/users/user_detail.html:40
5
#: users/templates/users/user_profile.html:204
#: users/templates/users/user_profile.html:209
msgid "User SSH public key update"
...
...
@@ -2670,11 +2674,11 @@ msgstr "或者重置并下载密钥"
msgid "Update user"
msgstr "更新用户"
#: users/utils.py:3
6
#: users/utils.py:3
7
msgid "Create account successfully"
msgstr "创建账户成功"
#: users/utils.py:3
8
#: users/utils.py:3
9
#, python-format
msgid ""
"\n"
...
...
@@ -2715,7 +2719,7 @@ msgstr ""
" </br>\n"
" "
#: users/utils.py:7
4
#: users/utils.py:7
5
#, python-format
msgid ""
"\n"
...
...
@@ -2759,11 +2763,11 @@ msgstr ""
" </br>\n"
" "
#: users/utils.py:10
5
#: users/utils.py:10
6
msgid "SSH Key Reset"
msgstr "重置ssh密钥"
#: users/utils.py:10
7
#: users/utils.py:10
8
#, python-format
msgid ""
"\n"
...
...
@@ -2788,15 +2792,15 @@ msgstr ""
" </br>\n"
" "
#: users/utils.py:14
0
#: users/utils.py:14
1
msgid "User not exist"
msgstr "用户不存在"
#: users/utils.py:14
2
#: users/utils.py:14
3
msgid "Disabled or expired"
msgstr "禁用或失效"
#: users/utils.py:15
5
#: users/utils.py:15
6
msgid "Password or SSH public key invalid"
msgstr "密码或密钥不合法"
...
...
@@ -2816,7 +2820,7 @@ msgstr "用户组授权资产"
msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie"
#: users/views/login.py:107 users/views/user.py:4
79 users/views/user.py:507
#: users/views/login.py:107 users/views/user.py:4
64 users/views/user.py:489
msgid "Otp code invalid"
msgstr "otp码认证失败"
...
...
@@ -2889,23 +2893,23 @@ msgstr "密码更新"
msgid "Public key update"
msgstr "密钥更新"
#: users/views/user.py:4
30
#: users/views/user.py:4
21
msgid "Password invalid"
msgstr "用户名或密码无效"
#: users/views/user.py:5
3
5
#: users/views/user.py:5
1
5
msgid "OTP enable success"
msgstr "OTP 绑定成功"
#: users/views/user.py:5
3
6
#: users/views/user.py:5
1
6
msgid "OTP enable success, return login page"
msgstr "OTP 绑定成功,返回到登录页面"
#: users/views/user.py:5
3
8
#: users/views/user.py:5
1
8
msgid "OTP disable success"
msgstr "OTP 解绑成功"
#: users/views/user.py:5
3
9
#: users/views/user.py:5
1
9
msgid "OTP disable success, return login page"
msgstr "OTP 解绑成功,返回登录页面"
...
...
apps/users/templates/users/user_detail.html
View file @
967491fb
...
...
@@ -152,7 +152,7 @@
<td><span
class=
"pull-right"
>
<div
class=
"switch"
>
<div
class=
"onoffswitch"
>
<input
type=
"checkbox"
class=
"onoffswitch-checkbox"
{%
if
user_object
.
otp_force_enabled
%}
checked
{%
endif
%}{%
if
request
.
user =
=
user_object
%}
disabl
ed
{%
endif
%}
<input
type=
"checkbox"
class=
"onoffswitch-checkbox"
{%
if
user_object
.
otp_force_enabled
%}
check
ed
{%
endif
%}
id=
"force_enable_otp"
>
<label
class=
"onoffswitch-label"
for=
"force_enable_otp"
>
<span
class=
"onoffswitch-inner"
></span>
...
...
@@ -287,6 +287,11 @@ $(document).ready(function() {
});
})
.
on
(
'click'
,
'#force_enable_otp'
,
function
()
{
{
%
if
request
.
user
==
user_object
%
}
toastr
.
error
(
"{% trans 'Goto profile page enable otp' %}"
);
return
{
%
endif
%
}
var
the_url
=
"{% url 'api-users:user-detail' pk=user_object.id %}"
;
var
checked
=
$
(
this
).
prop
(
'checked'
);
var
otp_level
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment