Unverified Commit cccc7427 authored by 老广's avatar 老广 Committed by GitHub

Dev license (#2409)

* [Update] 更新用户组

* [Update] license - 更新翻译

* [Feature] interface - 自定义配置logo,修改前端(待续)

* [Update] interface更新前端页面,两个登陆首页的模版设

* [Update]修改新登陆模版全局变量,国际化翻译,登陆逻辑页面切换

* [Update] 优化Interface前端逻辑

* [Update] Interface 修改前端一些小问题

* [Update] License/Interface 生成翻译信息
parent 859f2d97
......@@ -108,7 +108,6 @@ MIDDLEWARE = [
ROOT_URLCONF = 'jumpserver.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
......
......@@ -193,7 +193,7 @@ msgstr "名称"
#: perms/templates/perms/asset_permission_user.html:55 users/forms.py:15
#: users/forms.py:33 users/models/authentication.py:77 users/models/user.py:53
#: users/templates/users/_select_user_modal.html:14
#: users/templates/users/login.html:64
#: users/templates/users/login.html:64 users/templates/users/new_login.html:79
#: users/templates/users/user_detail.html:67
#: users/templates/users/user_list.html:24
#: users/templates/users/user_profile.html:47
......@@ -206,7 +206,7 @@ msgstr "密码或密钥密码"
#: assets/forms/user.py:26 assets/models/base.py:24 common/forms.py:102
#: users/forms.py:17 users/forms.py:35 users/forms.py:47
#: users/templates/users/login.html:67
#: users/templates/users/login.html:67 users/templates/users/new_login.html:84
#: users/templates/users/reset_password.html:53
#: users/templates/users/user_create.html:10
#: users/templates/users/user_password_authentication.html:18
......@@ -579,6 +579,7 @@ msgstr "优先级可选范围为1-100,1最低优先级,100最高优先级"
#: assets/models/cmd_filter.py:50
#: assets/templates/assets/cmd_filter_rule_list.html:59
#: xpack/plugins/license/models.py:27
msgid "Content"
msgstr "内容"
......@@ -922,6 +923,7 @@ msgstr "其它"
#: users/templates/users/user_pubkey_update.html:76
#: xpack/plugins/cloud/templates/cloud/account_create_update.html:33
#: xpack/plugins/cloud/templates/cloud/sync_instance_task_create.html:35
#: xpack/plugins/interface/templates/interface/interface.html:50
msgid "Reset"
msgstr "重置"
......@@ -948,12 +950,13 @@ msgstr "重置"
#: terminal/templates/terminal/session_list.html:127
#: terminal/templates/terminal/terminal_update.html:46
#: users/templates/users/_user.html:51
#: users/templates/users/forgot_password.html:45
#: users/templates/users/forgot_password.html:49
#: users/templates/users/user_bulk_update.html:24
#: users/templates/users/user_list.html:45
#: users/templates/users/user_password_update.html:72
#: users/templates/users/user_profile_update.html:64
#: users/templates/users/user_pubkey_update.html:77
#: xpack/plugins/interface/templates/interface/interface.html:51
msgid "Submit"
msgstr "提交"
......@@ -1170,6 +1173,7 @@ msgstr "创建日期"
#: terminal/templates/terminal/session_detail.html:81
#: users/templates/users/user_detail.html:138
#: users/templates/users/user_profile.html:146
#: xpack/plugins/license/templates/license/license_detail.html:81
msgid "Quick modify"
msgstr "快速修改"
......@@ -1216,6 +1220,7 @@ msgstr "创建资产"
#: assets/templates/assets/asset_list.html:73
#: users/templates/users/user_list.html:7
#: xpack/plugins/license/templates/license/license_detail.html:89
msgid "Import"
msgstr "导入"
......@@ -2828,7 +2833,7 @@ msgid "Logout"
msgstr "注销登录"
#: templates/_header_bar.html:101 users/templates/users/login.html:46
#: users/templates/users/login.html:72
#: users/templates/users/login.html:72 users/templates/users/new_login.html:90
msgid "Login"
msgstr "登录"
......@@ -2896,9 +2901,9 @@ msgstr ""
"\"%(user_pubkey_update)s\"> 链接 </a> 更新\n"
" "
#: templates/_nav.html:10 users/views/group.py:28 users/views/group.py:44
#: users/views/group.py:60 users/views/group.py:76 users/views/group.py:92
#: users/views/login.py:349 users/views/user.py:68 users/views/user.py:83
#: templates/_nav.html:10 users/views/group.py:27 users/views/group.py:43
#: users/views/group.py:59 users/views/group.py:75 users/views/group.py:91
#: users/views/login.py:360 users/views/user.py:68 users/views/user.py:83
#: users/views/user.py:113 users/views/user.py:194 users/views/user.py:355
#: users/views/user.py:405 users/views/user.py:445
msgid "Users"
......@@ -2972,7 +2977,14 @@ msgstr "语言播放验证码"
msgid "Captcha"
msgstr "验证码"
#: templates/flash_message_standalone.html:45
#: templates/flash_message_standalone.html:35
#: users/templates/users/login.html:27 users/templates/users/login_otp.html:27
#: users/templates/users/new_login.html:50
#: users/templates/users/reset_password.html:25
msgid "Welcome to the Jumpserver open source fortress"
msgstr "欢迎使用Jumpserver开源堡垒机"
#: templates/flash_message_standalone.html:56
msgid "Return"
msgstr "返回"
......@@ -3339,6 +3351,7 @@ msgid ""
msgstr "你可以使用ssh客户端工具连接终端"
#: users/api/auth.py:40 users/templates/users/login.html:52
#: users/templates/users/new_login.html:65
msgid "Log in frequently and try again later"
msgstr "登录频繁, 稍后重试"
......@@ -3619,7 +3632,7 @@ msgid "Date password last updated"
msgstr "最后更新密码日期"
#: users/models/user.py:128 users/templates/users/user_update.html:22
#: users/views/login.py:243 users/views/login.py:302 users/views/user.py:418
#: users/views/login.py:254 users/views/login.py:313 users/views/user.py:418
msgid "User auth from {}, go there change password"
msgstr "用户认证源来自 {}, 请去相应系统修改密码"
......@@ -3722,20 +3735,15 @@ msgid " for more information"
msgstr "获取更多信息"
#: users/templates/users/forgot_password.html:11
#: users/templates/users/forgot_password.html:27
#: users/templates/users/login.html:83
#: users/templates/users/forgot_password.html:31
#: users/templates/users/login.html:83 users/templates/users/new_login.html:94
msgid "Forgot password"
msgstr "忘记密码"
#: users/templates/users/forgot_password.html:34
#: users/templates/users/forgot_password.html:38
msgid "Input your email, that will send a mail to your"
msgstr "输入您的邮箱, 将会发一封重置邮件到您的邮箱中"
#: users/templates/users/login.html:27 users/templates/users/login_otp.html:27
#: users/templates/users/reset_password.html:25
msgid "Welcome to the Jumpserver open source fortress"
msgstr "欢迎使用Jumpserver开源堡垒机"
#: users/templates/users/login.html:29 users/templates/users/login_otp.html:29
msgid ""
"The world's first fully open source fortress, using the GNU GPL v2.0 open "
......@@ -3768,11 +3776,11 @@ msgstr ""
msgid "Changes the world, starting with a little bit."
msgstr "改变世界,从一点点开始。"
#: users/templates/users/login.html:54
#: users/templates/users/login.html:54 users/templates/users/new_login.html:67
msgid "The user password has expired"
msgstr "用户密码已过期"
#: users/templates/users/login.html:57
#: users/templates/users/login.html:57 users/templates/users/new_login.html:70
msgid "Captcha invalid"
msgstr "验证码错误"
......@@ -3812,6 +3820,14 @@ msgstr "6位数字"
msgid "Can't provide security? Please contact the administrator!"
msgstr "如果不能提供MFA验证码,请联系管理员!"
#: users/templates/users/new_login.html:15
msgid "Login Jumpserver"
msgstr "登录 Jumpserver"
#: users/templates/users/new_login.html:55
msgid "Welcome back, please enter username and password to login"
msgstr "欢迎回来,请输入用户名和密码登录"
#: users/templates/users/reset_password.html:28
msgid ""
"Jumpserver is an open source desktop system developed using Python and "
......@@ -4018,7 +4034,7 @@ msgstr "重置用户MFA成功"
#: users/templates/users/user_group_detail.html:22
#: users/templates/users/user_group_granted_asset.html:18
#: users/views/group.py:77
#: users/views/group.py:76
msgid "User group detail"
msgstr "用户组详情"
......@@ -4027,7 +4043,7 @@ msgstr "用户组详情"
msgid "Add user"
msgstr "添加用户"
#: users/templates/users/user_group_list.html:5 users/views/group.py:45
#: users/templates/users/user_group_list.html:5 users/views/group.py:44
msgid "Create user group"
msgstr "创建用户组"
......@@ -4360,68 +4376,68 @@ msgstr "禁用或失效"
msgid "Password or SSH public key invalid"
msgstr "密码或密钥不合法"
#: users/views/group.py:29
#: users/views/group.py:28
msgid "User group list"
msgstr "用户组列表"
#: users/views/group.py:61
#: users/views/group.py:60
msgid "Update user group"
msgstr "更新用户组"
#: users/views/group.py:93
#: users/views/group.py:92
msgid "User group granted asset"
msgstr "用户组授权资产"
#: users/views/login.py:69
#: users/views/login.py:80
msgid "Please enable cookies and try again."
msgstr "设置你的浏览器支持cookie"
#: users/views/login.py:191 users/views/user.py:532 users/views/user.py:557
#: users/views/login.py:202 users/views/user.py:532 users/views/user.py:557
msgid "MFA code invalid, or ntp sync server time"
msgstr "MFA验证码不正确,或者服务器端时间不对"
#: users/views/login.py:223
#: users/views/login.py:234
msgid "Logout success"
msgstr "退出登录成功"
#: users/views/login.py:224
#: users/views/login.py:235
msgid "Logout success, return login page"
msgstr "退出登录成功,返回到登录页面"
#: users/views/login.py:240
#: users/views/login.py:251
msgid "Email address invalid, please input again"
msgstr "邮箱地址错误,重新输入"
#: users/views/login.py:256
#: users/views/login.py:267
msgid "Send reset password message"
msgstr "发送重置密码邮件"
#: users/views/login.py:257
#: users/views/login.py:268
msgid "Send reset password mail success, login your mail box and follow it "
msgstr ""
"发送重置邮件成功, 请登录邮箱查看, 按照提示操作 (如果没收到,请等待3-5分钟)"
#: users/views/login.py:270
#: users/views/login.py:281
msgid "Reset password success"
msgstr "重置密码成功"
#: users/views/login.py:271
#: users/views/login.py:282
msgid "Reset password success, return to login page"
msgstr "重置密码成功,返回到登录页面"
#: users/views/login.py:286 users/views/login.py:305
#: users/views/login.py:297 users/views/login.py:316
msgid "Token invalid or expired"
msgstr "Token错误或失效"
#: users/views/login.py:298
#: users/views/login.py:309
msgid "Password not same"
msgstr "密码不一致"
#: users/views/login.py:311 users/views/user.py:128 users/views/user.py:428
#: users/views/login.py:322 users/views/user.py:128 users/views/user.py:428
msgid "* Your password does not meet the requirements"
msgstr "* 您的密码不符合要求"
#: users/views/login.py:349
#: users/views/login.py:360
msgid "First login"
msgstr "首次登录"
......@@ -4684,6 +4700,141 @@ msgstr "同步实例任务列表"
msgid "Create sync Instance task"
msgstr "创建同步实例任务"
#: xpack/plugins/interface/forms.py:11 xpack/plugins/interface/models.py:15
msgid "Title of login page"
msgstr "登录页面标题"
#: xpack/plugins/interface/forms.py:13
msgid ""
"Tips: This will be displayed on the enterprise user login page. (eg: Welcome "
"to the Jumpserver open source fortress)"
msgstr "提示:将会显示在企业版用户登录页面(eg: 欢迎使用Jumpserver开源堡垒机)"
#: xpack/plugins/interface/forms.py:19 xpack/plugins/interface/models.py:19
msgid "Image of login page"
msgstr "登录页面图片"
#: xpack/plugins/interface/forms.py:21
msgid ""
"Tips: This will be displayed on the enterprise user login page. (suggest "
"image size: 635px*472px)"
msgstr "提示:将会显示在企业版用户登录页面(建议图片大小为: 635px*472px)"
#: xpack/plugins/interface/forms.py:27 xpack/plugins/interface/models.py:23
msgid "Website icon"
msgstr "网站图标"
#: xpack/plugins/interface/forms.py:29
msgid "Tips: website icon. (suggest image size: 16px*16px)"
msgstr "提示:网站图标(建议图片大小为: 16px*16px)"
#: xpack/plugins/interface/forms.py:34 xpack/plugins/interface/models.py:27
msgid "Logo of management page"
msgstr "管理页面logo"
#: xpack/plugins/interface/forms.py:36
msgid ""
"Tips: This will appear at the top left of the administration page. (suggest "
"image size: 185px*55px)"
msgstr "提示:将会显示在管理页面左上方(建议图片大小为: 185px*55px)"
#: xpack/plugins/interface/forms.py:42 xpack/plugins/interface/models.py:31
msgid "Logo of logout page"
msgstr "退出页面logo"
#: xpack/plugins/interface/forms.py:44
msgid ""
"Tips: This will be displayed on the enterprise user logout page. (suggest "
"image size: 82px*82px)"
msgstr "提示:将会显示在企业版用户退出页面(建议图片大小为:82px*82px)"
#: xpack/plugins/interface/meta.py:10
msgid "Interface settings"
msgstr "界面设置"
#: xpack/plugins/interface/templates/interface/interface.html:15
#: xpack/plugins/interface/views.py:21
msgid "Interface setting"
msgstr "界面设置"
#: xpack/plugins/interface/views.py:20
msgid "Interface"
msgstr "界面"
#: xpack/plugins/license/meta.py:11 xpack/plugins/license/views.py:27
msgid "License"
msgstr "许可证"
#: xpack/plugins/license/templates/license/_license_import_modal.html:4
#: xpack/plugins/license/templates/license/license_detail.html:87
msgid "Import license"
msgstr "导入许可证"
#: xpack/plugins/license/templates/license/_license_import_modal.html:9
msgid "License file"
msgstr "许可证文件"
#: xpack/plugins/license/templates/license/license_detail.html:12
msgid "Please Import License"
msgstr "请导入许可证"
#: xpack/plugins/license/templates/license/license_detail.html:17
msgid "License has expired"
msgstr "许可证已经过期"
#: xpack/plugins/license/templates/license/license_detail.html:22
msgid "The license will at "
msgstr "许可证将在 "
#: xpack/plugins/license/templates/license/license_detail.html:22
msgid " expired."
msgstr " 过期。"
#: xpack/plugins/license/templates/license/license_detail.html:37
#: xpack/plugins/license/views.py:28
msgid "License detail"
msgstr "许可证详情"
#: xpack/plugins/license/templates/license/license_detail.html:53
msgid "Corporation"
msgstr "公司"
#: xpack/plugins/license/templates/license/license_detail.html:57
msgid "Expired"
msgstr "过期时间"
#: xpack/plugins/license/templates/license/license_detail.html:61
msgid "Count"
msgstr "数量"
#: xpack/plugins/license/templates/license/license_detail.html:63
msgid "Unlimited"
msgstr "无限制"
#: xpack/plugins/license/templates/license/license_detail.html:67
msgid "Edition"
msgstr "版本"
#: xpack/plugins/license/templates/license/license_detail.html:69
msgid "Enterprise edition"
msgstr "企业版"
#: xpack/plugins/license/templates/license/license_detail.html:93
msgid "Technology consulting"
msgstr "技术咨询"
#: xpack/plugins/license/templates/license/license_detail.html:96
msgid "Consult"
msgstr "咨询"
#: xpack/plugins/license/views.py:45
msgid "License import successfully"
msgstr "许可证导入成功"
#: xpack/plugins/license/views.py:47
msgid "License is invalid"
msgstr "无效的许可证"
#: xpack/plugins/orgs/forms.py:14
#: xpack/plugins/orgs/templates/orgs/org_detail.html:76
#: xpack/plugins/orgs/templates/orgs/org_list.html:13
......@@ -4728,6 +4879,16 @@ msgstr "创建组织"
msgid "Update org"
msgstr "更新组织"
#, fuzzy
#~| msgid "Delete succeed"
#~ msgid "Delete success!"
#~ msgstr "删除成功"
#, fuzzy
#~| msgid "Username does not exist"
#~ msgid "This license does not exist!"
#~ msgstr "用户名不存在"
#~ msgid "Valid"
#~ msgstr "账户状态"
......@@ -4774,11 +4935,6 @@ msgstr "更新组织"
#~ msgid "Bit"
#~ msgstr " 位"
#, fuzzy
#~| msgid "Delete succeed"
#~ msgid "Delete success"
#~ msgstr "删除成功"
#~ msgid ""
#~ "Set terminal storage setting, `default` is the using as default,You can "
#~ "set other storage and some terminal using"
......
/*!
* 覆盖bootstrap样式,项目CSS禁止修改或添加该CSS内容,否则被覆盖后果自负
**/
body {
font-family: "Microsoft Yahei", Helvetica, "PingFang SC", "Hiragino Sans GB", "STXihei", "SimHei", "SimSun", Helvetica Neue, Arial, sans-serif;
font-size: 14px;
line-height: 26px;
color: #2B415C;
background: #f2f2f2;
-webkit-font-smoothing: antialiased;
}
h1 {
font-size: 24px;
}
h2 {
font-size: 22px;
}
h3 {
font-size: 20px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 16px;
}
h6 {
font-size: 14px;
}
p {
padding: 0;
margin: 0;
}
a:hover {
text-decoration: none;
}
a:hover, a:active, a:focus {
outline: 0;
}
:focus {
outline: none;
}
::-moz-focus-inner {
border: 0;
}
/* Modal */
.modal-content {
padding-left: 20px;
padding-right: 20px;
position: relative;
background-color: #ffffff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #DFDFDF;
border-radius: 4px;
outline: 0;
}
.modal-header {
height: 56px;
max-height: 56px;
vertical-align: middle;
border-bottom: 1px solid #DFDFDF;
padding: 0;
}
.modal-header .close {
color: #2B415C;
background-color: transparent;
opacity: 0.5;
padding-top: 16px;
margin-top: 0;
font-size: 24px;
}
.modal-header .modal-title {
float: left;
color: #2B415C;
font-size: 18px;
line-height: 24px;
padding-top: 16px;
padding-bottom: 16px;
}
.modal-body {
padding: 15px 0;
}
.modal-footer {
padding-top: 0;
padding-bottom: 26px;
border-top: none;
text-align: center;
}
/* Form */
form label {
opacity: 0.75;
color: #405773;
line-height: 19px;
white-space: nowrap;
}
.form-control {
color: #2B415C;
background-color: #FFF;
border: 1px solid #8B9EB6;
border-radius: 2px;
-webkit-box-shadow: none;
box-shadow: none;
}
.form-control:invalid {
color: #FF521B;
border-color: #FF521B;
}
.form-control:hover {
border-color: #CED0DA;
background-color: #FFF;
}
.form-control:focus {
color: #2B415C;
background-color: #F6F9Fd;
border-color: #2EA2F8;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.form-control::-moz-placeholder {
color: #354052;
opacity: 0.5;
}
.form-control:-ms-input-placeholder {
color: #354052;
opacity: 0.5;
}
.form-control::-webkit-input-placeholder {
color: #354052;
opacity: 0.5;
}
.form-control[readonly] {
background-color: #FBFCFD;
cursor: default;
}
.form-control[disabled], fieldset[disabled] .form-control {
background-color: #E7EAED;
cursor: default;
opacity: 0.75;
}
.form-control[disabled]:hover, .form-control[readonly]:hover, fieldset[disabled] .form-control:hover {
border-color: #8B9EB6;
}
.input-group-addon {
color: #2B415C;
background-color: #FBFCFD;
border: 1px solid #8B9EB6;
}
/*popover*/
.popover {
border-radius: 4px;
-webkit-box-shadow: none;
box-shadow: none;
}
.popover-content {
padding: 0;
min-width: 160px;
}
/*页签*/
.nav-tabs {
border-bottom: none;
}
.nav-tabs.nav-tabs-white {
border-bottom: 1px solid #FFFFFF;
}
.nav-tabs.nav-tabs-grey {
border-bottom: 1px solid #DFDFDF;
}
.nav-tabs > li.active > a {
font-weight: normal;
border-top: 2px solid #095DB1;
border-bottom: none;
border-radius: 0;
}
.nav-white > li.active > a {
z-index: 99;
}
.nav-tabs > li > a {
border: 1px solid #DFDFDF;
border-radius: 0;
background-color: #F8F8F8;
color: #2B415C;
}
.nav-tabs > li > a:hover {
border-bottom-color: #fff;
}
.nav-tabs > li > a:focus, .nav-tabs > li > a:hover {
background-color: #fff;
}
.nav-tabs > li.active > a, .nav-tabs > li.active > a:focus, .nav-tabs > li.active > a:hover {
color: #095DB1;
}
.nav-pills > li + li {
margin-bottom: 5px;
}
.nav-pills > li {
margin-left: 2px;
}
/*表格样式*/
.table {
border-radius: 0;
border: 0;
font-size: 12px;
}
.table > thead > tr > th {
border: none;
background-color: #DDE7F4;
padding: 5px 10px;
vertical-align: middle;
height: 35px;
}
.table.table-bordered > thead > tr > th {
border-left: 1px solid #BFCDE0;
}
.table.table-bordered > thead > tr > th:first-child {
border-left: none;
}
.table tbody > tr > td {
border: none;
border-left: 1px solid transparent;
padding: 5px 10px;
vertical-align: middle;
height: 35px;
}
.table.table-bordered tbody > tr > td {
border-left: 1px solid #DFDFDF;
}
.table.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #F6F9FC;
}
.table > tbody > tr {
border-top: 1px solid transparent;
}
.table.table-bordered > tbody > tr {
border-top: 1px solid #DFDFDF;
}
.table.table-bordered > tbody > tr:last-child {
border-bottom: 1px solid #DFDFDF;
}
.table.table-hover > tbody > tr:hover {
background-color: #EBFAFF;
border-top: 1px solid #23A9F6;
border-bottom: 1px solid #23A9F6;
}
.table.table-hover > tbody > tr:hover td:last-child {
border-right: none;
}
.table > tbody > tr.tr-selected,
.table.table-bordered > tbody > tr.tr-selected,
.table.table-condensed > tbody > tr.tr-selected,
.table.table-hover > tbody > tr.tr-selected,
.table.table-striped > tbody > tr.tr-selected,
.table.table-responsive > tbody > tr.tr-selected {
background-color: #E7EAED;
}
.table.table-hover > tbody > tr:hover td:first-child {
border-left: none;
}
.table.table-hover > tbody > tr:hover td:last-child {
border-right: none;
}
.table td:first-child, .table th:first-child,
.table.table-bordered td:first-child {
border-left: none;
}
.table td:last-child, .table th:last-child,
.table.table-bordered td:last-child {
border-right: none;
}
.table thead:first-child tr:first-child > th:first-child,
.table tbody:first-child tr:first-child > td:first-child {
border-radius: 0;
}
/*分页*/
.ng-pagination {
font-size: 12px;
color: #858585;
}
.ng-pagination > ul > li {
min-width: 38px;
min-height: 38px;
border: 1px solid #F2F2F2;
border-radius: 2px;
}
.ng-pagination > ul > li.active, .ng-pagination > ul > li.active:hover {
background-color: #215db1;
border: 1px solid #215db1;
color: #FFF;
}
.ng-pagination > ul > li:hover {
background-color: transparent;
border: 1px solid #23A9F6;
color: #23A9F6;
}
/* 按钮 */
.btn {
border-radius: 2px;
min-width: 80px;
min-height: 28px;
padding: 0;
}
.btn.active, .btn:active {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn.active.focus, .btn.active:focus, .btn.focus, .btn:active.focus, .btn:active:focus, .btn:focus {
outline: none;
}
/* btn-primary */
.btn-primary {
color: #FFF;
background-color: #095DB1;
border-color: #095DB1;
}
.btn-primary:focus,
.btn-primary.focus {
color: #fff;
background-color: #095DB1;
border-color: #095DB1;
}
.btn-primary:hover {
color: #fff;
background-color: #0D6FD1;
border-color: #0D6FD1;
}
.btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
color: #fff;
background-color: #095DB1;
border-color: #095DB1;
}
.btn-primary:active:hover,
.btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary:hover,
.btn-primary:active:focus,
.btn-primary.active:focus,
.open > .dropdown-toggle.btn-primary:focus,
.btn-primary:active.focus,
.btn-primary.active.focus,
.open > .dropdown-toggle.btn-primary.focus {
color: #fff;
background-color: #095DB1;
border-color: #095DB1;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
color: #fff;
background-color: #095DB1;
border-color: #095DB1;
opacity: 0.5;
}
.btn-primary .badge {
color: #095DB1;
background-color: #fff;
}
/* btn-info */
.btn-info {
color: #FFF;
background-color: #23A9F6;
border-color: #23A9F6;
}
.btn-info:focus,
.btn-info.focus {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
}
.btn-info:hover {
color: #fff;
background-color: #53C0FF;
border-color: #53C0FF;
}
.btn-info:active, .btn-info.active, .open > .dropdown-toggle.btn-info {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
}
.btn-info:active:hover,
.btn-info.active:hover,
.open > .dropdown-toggle.btn-info:hover,
.btn-info:active:focus,
.btn-info.active:focus,
.open > .dropdown-toggle.btn-info:focus,
.btn-info:active.focus,
.btn-info.active.focus,
.open > .dropdown-toggle.btn-info.focus {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
opacity: 0.5;
}
.btn-info .badge {
color: #23A9F6;
background-color: #fff;
}
/* btn-default */
.btn-default {
color: #095DB1;
background-color: #FFF;
border-color: rgba(9, 93, 177, 0.70);
}
.btn-default:focus,
.btn-default.focus {
color: #095DB1;
background-color: #FFF;
border-color: rgba(9, 93, 177, 0.70);
}
.btn-default:hover {
color: #23A9F6;
background-color: #fff;
border-color: #23A9F6;
}
.btn-default:active, .btn-default.active, .open > .dropdown-toggle.btn-default {
color: #095DB1;
background-color: #FFF;
border-color: rgba(9, 93, 177, 0.70);
}
.btn-default:active:hover,
.btn-default.active:hover,
.open > .dropdown-toggle.btn-default:hover,
.btn-default:active:focus,
.btn-default.active:focus,
.open > .dropdown-toggle.btn-default:focus,
.btn-default:active.focus,
.btn-default.active.focus,
.open > .dropdown-toggle.btn-default.focus {
color: #095DB1;
background-color: #FFF;
border-color: rgba(9, 93, 177, 0.70);
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
color: #095DB1;
background-color: #FFF;
border-color: rgba(9, 93, 177, 0.70);
opacity: 0.5;
}
.btn-default .badge {
color: #095DB1;
background-color: #FFF;
}
/* btn-success */
.btn-success {
color: #FFF;
background-color: #8FB143;
border-color: #8FB143;
}
.btn-success:focus,
.btn-success.focus {
color: #fff;
background-color: #8FB143;
border-color: #8FB143;
}
.btn-success:hover {
color: #fff;
background-color: #A9D051;
border-color: #A9D051;
}
.btn-success:active, .btn-success.active, .open > .dropdown-toggle.btn-success {
color: #fff;
background-color: #8FB143;
border-color: #8FB143;
}
.btn-success:active:hover,
.btn-success.active:hover,
.open > .dropdown-toggle.btn-success:hover,
.btn-success:active:focus,
.btn-success.active:focus,
.open > .dropdown-toggle.btn-success:focus,
.btn-success:active.focus,
.btn-success.active.focus,
.open > .dropdown-toggle.btn-success.focus {
color: #fff;
background-color: #8FB143;
border-color: #8FB143;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
color: #fff;
background-color: #8FB143;
border-color: #8FB143;
opacity: 0.5;
}
.btn-success .badge {
color: #8FB143;
background-color: #fff;
}
/* btn-danger */
.btn-danger {
color: #FFF;
background-color: #FF521B;
border-color: #FF521B;
}
.btn-danger:focus,
.btn-danger.focus {
color: #fff;
background-color: #FF521B;
border-color: #FF521B;
}
.btn-danger:hover {
color: #fff;
background-color: #FF6C3E;
border-color: #FF6C3E;
}
.btn-danger:active, .btn-danger.active, .open > .dropdown-toggle.btn-danger {
color: #fff;
background-color: #FF521B;
border-color: #FF521B;
}
.btn-danger:active:hover,
.btn-danger.active:hover,
.open > .dropdown-toggle.btn-danger:hover,
.btn-danger:active:focus,
.btn-danger.active:focus,
.open > .dropdown-toggle.btn-danger:focus,
.btn-danger:active.focus,
.btn-danger.active.focus,
.open > .dropdown-toggle.btn-danger.focus {
color: #fff;
background-color: #FF521B;
border-color: #FF521B;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
color: #fff;
background-color: #FF521B;
border-color: #FF521B;
opacity: 0.5;
}
.btn-danger .badge {
color: #FF521B;
background-color: #fff;
}
/*!
* 覆盖bootstrap样式,项目CSS禁止修改或添加该CSS内容,否则被覆盖后果自负
**/
\ No newline at end of file
......@@ -131,10 +131,18 @@ table.dataTable tbody td.selected td i.text-navy {
margin-right: 5px !important;
}
.m-m-m{
margin-left: 50px !important;
}
.m-10 {
margin: 10px !important;
}
.f-i-l-e{
/*float: left;*/
margin-left: 1000px !important;
/*padding-left: 1000px !important;*/
}
.m-t-10 {
margin-top: 10px !important;
}
......
.login_body {
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
-moz-background-size: 100% 100%;
background-color: #f2f2f2;
width: 100%;
height: 100%;
}
.login-dialog {
margin-top: -moz-calc((100vh - 575px) / 2);
margin-top: -webkit-calc((100vh - 575px) / 2);
margin-top: calc((100vh - 575px) / 2);
margin-left: auto;
margin-right: auto;
}
.login-container {
width: 100%;
}
.input_shadow-1{
box-shadow:-2px 5px 5px #9999
}
.button-shadow{
box-shadow:-1px 3px 3px #9999 ;
}
.contact-form .form-control-1 {
background-color: transparent;
border: 1px solid #dedede;
box-shadow: none;
height: 45px !important;
color: #0c0c0c;
height: 30px;
font-family: -apple-system, BlinkMacSystemFont, "Neue Haas Grotesk Text Pro", "Arial Nova", "Segoe UI", "Helvetica Neue", ".PingFang SC", "PingFang SC", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "Hiragino Sans GB", sans-serif;
font-size: 14px;
border-radius: 0;
}
.login-logo {
text-align: center;
height: 80px;
width: 500px;
display: table-cell;
vertical-align: middle;
}
.login-logo img {
max-height: 80px;
max-width: 500px;
}
.login-title {
margin-top: 40px;
text-align: left;
font-family: "Microsoft Yahei", sans-serif;
font-size: 16px;
color: #FFFFFF;
letter-spacing: 0;
}
.login-form {
padding: 16px 0;
}
.login-input {
position: relative;
height: 40px;
}
.login-input-control {
background-color: #FFFFFF;
border: 1px solid #0D6FD1;
position: absolute;
padding: 6px 6px 6px 62px;
border-radius: 2px;
width: 500px;
height: 40px;
font-size: 14px;
color: #2C3C4E;
letter-spacing: 0;
display: block;
}
.login-input-invalid {
color: #FF521B;
border-color: #FF521B;
}
.login-input-control:focus {
color: #0D6FD1;
border-color: #0D6FD1;
}
.login-input-control:-webkit-autofill {
-webkit-box-shadow: 0 0 0 50px white inset;
}
.login-input-prefix {
position: absolute;
top: 11px;
left: 20px;
line-height: 18px;
text-align: center;
width: 22px;
height: 20px;
padding: 0 1px;
z-index: 1;
}
.login-input-prefix .fa {
font-size: 20px;
}
.login-input-prefix .fa {
color: #0D6FD1;
}
.login-input-prefix img {
max-width: 20px;
}
.login-error-msg {
position: absolute;
top: 9px;
right: 40px;
line-height: 22px;
color: #FF521B;
font-size: 12px;
letter-spacing: -0.25px;
z-index: 1;
}
.login-input-postfix {
position: absolute;
top: 9px;
right: 10px;
line-height: 20px;
z-index: 1;
}
.login-input-postfix img {
width: 22px;
height: 22px;
}
.login-input-required .fa {
font-size: 20px;
vertical-align: middle;
}
.login-msg {
color: #FF521B;
height: 30px;
padding-right: 20px;
}
.btn-login {
color: #FFFFFF;
background-color: #23A9F6;
border-color: #23A9F6;
border-radius: 30px;
width: 500px;
height: 40px;
font-size: 14px;
letter-spacing: 0;
line-height: 18px;
}
.btn-login:focus,
.btn-login.focus {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
}
.btn-login:hover {
color: #fff;
background-color: #53C0FF;
border-color: #53C0FF;
}
.btn-login:active, .btn-login.active, .open > .dropdown-toggle.btn-login {
color: #fff;
background-color: #0D6FD1;
border-color: #0D6FD1;
}
.btn-login:active:hover,
.btn-login.active:hover,
.open > .dropdown-toggle.btn-login:hover,
.btn-login:active:focus,
.btn-login.active:focus,
.open > .dropdown-toggle.btn-login:focus,
.btn-login:active.focus,
.btn-login.active.focus,
.open > .dropdown-toggle.btn-login.focus {
color: #fff;
background-color: #53C0FF;
border-color: #53C0FF;
}
.btn-login:active,
.btn-login.active,
.open > .dropdown-toggle.btn-login {
background-image: none;
}
.btn-login.disabled,
.btn-login[disabled],
fieldset[disabled] .btn-login,
.btn-login.disabled:hover,
.btn-login[disabled]:hover,
fieldset[disabled] .btn-login:hover,
.btn-login.disabled:focus,
.btn-login[disabled]:focus,
fieldset[disabled] .btn-login:focus,
.btn-login.disabled.focus,
.btn-login[disabled].focus,
fieldset[disabled] .btn-login.focus,
.btn-login.disabled:active,
.btn-login[disabled]:active,
fieldset[disabled] .btn-login:active,
.btn-login.disabled.active,
.btn-login[disabled].active,
fieldset[disabled] .btn-login.active {
color: #fff;
background-color: #23A9F6;
border-color: #23A9F6;
opacity: 0.6;
}
.btn-login .badge {
color: #23A9F6;
background-color: #fff;
}
.contact-form .form-control {
background-color: transparent;
border: 1px solid #dedede;
box-shadow: none;
height: 45px !important;
color: #0c0c0c;
height: 38px;
font-family: -apple-system, BlinkMacSystemFont, "Neue Haas Grotesk Text Pro", "Arial Nova", "Segoe UI", "Helvetica Neue", ".PingFang SC", "PingFang SC", "Microsoft YaHei", "Microsoft JhengHei", "Source Han Sans SC", "Noto Sans CJK SC", "Source Han Sans CN", "Noto Sans SC", "Source Han Sans TC", "Noto Sans CJK TC", "Hiragino Sans GB", sans-serif;
font-size: 14px;
border-radius: 0;
}
.contact-form input:hover,
.contact-form textarea:hover,
.contact-form #contact-submit:hover {
border-color: #28ABE3;
}
.contact-form #contact-submit {
border: none;
padding: 15px 0;
width: 100%;
margin: 0;
background: #28ABE3;
color: #fff;
border-radius: 0;
}
.contact-form textarea.form-control {
padding: 10px;
height: 120px !important;
outline: none;
}
.btn-transparent {
color: #fff;
border: 1px solid #fff;
display: inline-block;
font-size: 13px;
letter-spacing: 1px;
padding: 14px 35px;
text-transform: uppercase;
border-radius: 40px;
background: #259980;
width: 100%;
}
.btn-transparent:hover {
color: #fff;
}
.border {
height: 2px;
margin: 20px auto 20px;
position: relative;
width: 80px;
background: #28ABE3;
}
......@@ -3,7 +3,11 @@
<li class="nav-header">
<div class="profile-element" style="height: 65px">
<div href="http://www.jumpserver.org" target="_blank" style="width: 100%; background-image: url({% static 'img/header-profile.png' %})">
<img alt="logo" height="55" width="185" src="/static/img/logo-text.png"/>
{% if interface and interface.logo_index %}
<img alt="logo" height="55" width="185" src="{{ MEDIA_URL }}{{ interface.logo_index }}"/>
{% else %}
<img alt="logo" height="55" width="185" src="{% static 'img/logo-text.png' %}"/>
{% endif %}
</div>
</div>
<div class="logo-element">
......
......@@ -5,8 +5,18 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<title>Jumpserver</title>
<link rel="shortcut icon" href="{% static 'img/facio.ico' %}" type="image/x-icon">
<title>
{% if interface and interface.login_title %}
{{ interface.login_title }}
{% else %}
Jumpserver
{% endif %}
</title>
{% if interface and interface.favicon %}
<link rel="shortcut icon" href="{{ MEDIA_URL }}{{ interface.favicon }}" type="image/x-icon">
{% else %}
<link rel="shortcut icon" href="{% static 'img/facio.ico' %}" type="image/x-icon">
{% endif %}
{% include '_head_css_js.html' %}
<link href="{% static 'css/jumpserver.css' %}" rel="stylesheet">
{% block custom_head_css_js %} {% endblock %}
......
......@@ -22,8 +22,19 @@
<div class="col-md-12">
<div class="ibox-content">
<div>
{% if interface and interface.logo_logout %}
<img src="{{ MEDIA_URL }}{{ interface.logo_logout }}" style="margin: auto" width="82" height="82">
{% else %}
<img src="{% static 'img/logo.png' %}" style="margin: auto" width="82" height="82">
<h2 style="display: inline">Jumpserver</h2>
{% endif %}
<h2 style="display: inline">
{% if interface and interface.login_title %}
{{ interface.login_title }}
{% else %}
{% trans 'Welcome to the Jumpserver open source fortress' %}
{% endif %}
</h2>
</div>
{% if errors %}
<p>
......
......@@ -22,8 +22,12 @@
<div class="col-md-12">
<div class="ibox-content">
{% if interface.logout_logo %}
<img src="{{ MEDIA_URL }}{{ interface.logout_logo }}" style="margin: auto" width="82" height="82">
{% else %}
<img src="{% static 'img/logo.png' %}" style="margin: auto" width="82" height="82">
{% endif %}
<img src="{% static 'img/logo.png' %}" style="margin: auto" width="82" height="82">
<h2 class="font-bold" style="display: inline">{% trans 'Forgot password' %} ?</h2>
<h1></h1>
......
......@@ -6,7 +6,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> Jumpserver </title>
<title>Jumpserver</title>
<link rel="shortcut icon" href="{% static "img/facio.ico" %}" type="image/x-icon">
{% include '_head_css_js.html' %}
<link href="{% static "css/jumpserver.css" %}" rel="stylesheet">
......@@ -24,7 +24,7 @@
<div class="row">
<div class="col-md-6">
<h2 class="font-bold">{% trans 'Welcome to the Jumpserver open source fortress' %}</h2>
<h2 class="font-bold" style="text-align: center">{% trans 'Welcome to the Jumpserver open source fortress' %}</h2>
<p>
{% trans "The world's first fully open source fortress, using the GNU GPL v2.0 open source protocol, is a professional operation and maintenance audit system in compliance with 4A." %}
</p>
......@@ -96,8 +96,7 @@
{% endif %}
</form>
<p class="m-t">
</p>
</div>
</div>
</div>
......
{% load static %}
{% load i18n %}
<!DOCTYPE html>
<html>
<!--/*@thymesVar id="LoginConstants" type="com.fit2cloud.support.common.constants.LoginConstants"*/-->
<!--/*@thymesVar id="message" type="java.lang.String"*/-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
{% if interface and interface.favicon %}
<link rel="shortcut icon" href="{{ MEDIA_URL }}{{ interface.favicon }}" type="image/x-icon">
{% else %}
<link rel="shortcut icon" href="{% static 'img/facio.ico' %}" type="image/x-icon">
{% endif %}
<title>
{% if interface and interface.login_title %}
{{ interface.login_title }}
{% else %}
Jumpserver
{% endif %}
</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Stylesheets -->
<link href="{% static 'css/bootstrap.min.css' %}" rel="stylesheet">
<link href="{% static 'css/font-awesome.min.css' %}" rel="stylesheet">
<link href="{% static 'css/bootstrap-style.css' %}" rel="stylesheet">
<link href="{% static 'css/login-style.css' %}" rel="stylesheet">
<!-- scripts -->
<script src="{% static 'js/jquery-2.1.1.js' %}"></script>
<script src="{% static 'js/plugins/sweetalert/sweetalert.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/plugins/datatables/datatables.min.js' %}"></script>
{# <script src="{% static 'js/angular.min.js' %}"></script>#}
<style>
.captcha {
float: right;
}
</style>
</head>
<body>
<div class="login-dialog">
<div class="">
<div class="row" style="height: 472px">
<div class="col-md-4 col-md-offset-2 input_shadow-1" style="text-align: center;background-color: white; padding-right: 0px;height: 100%">
<div style="background-color: white">
{% if interface.login_title %}
<div style="margin-top: 40px">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{{ interface.login_title }}</span>
</div>
{% else %}
<div style="margin-top: 40px">
<span style="font-size: 24px;font-weight:400;color: #151515;letter-spacing: 0;">{% trans 'Welcome to the Jumpserver open source fortress' %}</span>
</div>
{% endif %}
<div style="font-size: 12px;color: #999999;letter-spacing: 0;line-height: 18px;margin-top: 10px">
{% trans 'Welcome back, please enter username and password to login' %}
</div>
<div style="margin-bottom: 10px">
<div>
<div class="col-md-1"></div>
<div class="contact-form col-md-10" style="margin-top: 20px;height: 35px">
<form id="contact-form" action="" method="post" role="form" novalidate="novalidate">
{% csrf_token %}
<div style="height: 48px;color: red">
{% if block_login %}
<p class="red-fonts">{% trans 'Log in frequently and try again later' %}</p>
{% elif password_expired %}
<p class="red-fonts">{% trans 'The user password has expired' %}</p>
{% elif form.errors %}
{% if 'captcha' in form.errors %}
<p class="red-fonts">{% trans 'Captcha invalid' %}</p>
{% else %}
<p class="red-fonts">{{ form.non_field_errors.as_text }}</p>
{% endif %}
{% endif %}
</div>
<div class="form-group">
<input type="text" class="form-control" name="{{ form.username.html_name }}"
placeholder="{% trans 'Username' %}" required=""
value="{% if form.username.value %}{{ form.username.value }}{% endif %}" style="height: 35px">
</div>
<div class="form-group">
<input type="password" class="form-control" name="{{ form.password.html_name }}"
placeholder="{% trans 'Password' %}" required="">
</div>
<div class="form-group" style="height: 50px;margin-bottom: 0px">
{{ form.captcha }}
</div>
<div class="form-group" style="margin-top: 10px">
<button type="submit" class="btn btn-transparent">{% trans 'Login' %}</button>
</div>
<div style="text-align: center">
<a href="{% url 'users:forgot-password' %}">
<small>{% trans 'Forgot password' %}?</small>
</a>
</div>
</form>
</div>
<div class="col-md-1"></div>
</div>
</div>
</div>
</div>
<div class="col-md-4 " style="padding-left: 0px; height: 100%">
{% if interface.login_image %}
<img src="{{ MEDIA_URL }}{{ interface.login_image }}" style="width: 100%; height: 100%;" class="input_shadow-1" />
{% else %}
<img src="{% static 'img/login/login-image.jpg' %}" style="width: 100%; height: 100%;" class="input_shadow-1" />
{% endif %}
</div>
</div>
<div class="col-md-2"></div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
# ~*~ coding: utf-8 ~*~
from __future__ import unicode_literals
from django.utils.translation import ugettext as _
from django.urls import reverse_lazy
......
......@@ -42,12 +42,23 @@ __all__ = [
@method_decorator(csrf_protect, name='dispatch')
@method_decorator(never_cache, name='dispatch')
class UserLoginView(FormView):
template_name = 'users/login.html'
form_class = forms.UserLoginForm
form_class_captcha = forms.UserLoginCaptchaForm
redirect_field_name = 'next'
key_prefix_captcha = "_LOGIN_INVALID_{}"
def get_template_names(self):
template_name = 'users/login.html'
if not settings.XPACK_ENABLED:
return template_name
from xpack.plugins.license.models import License
if not License.has_valid_license():
return template_name
template_name = 'users/new_login.html'
return template_name
def get(self, request, *args, **kwargs):
if request.user.is_staff:
return redirect(redirect_user_first_login_or_index(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment