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
458ca42f
Commit
458ca42f
authored
Mar 01, 2015
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
未完成
parent
a50d3ba6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
6 deletions
+12
-6
mytags.py
jumpserver/templatetags/mytags.py
+1
-1
base.js
static/js/base.js
+6
-0
group_edit.html
templates/juser/group_edit.html
+4
-4
user_add.html
templates/juser/user_add.html
+1
-1
No files found.
jumpserver/templatetags/mytags.py
View file @
458ca42f
...
...
@@ -125,6 +125,6 @@ def to_role_name(role_id):
return
role_dict
.
get
(
str
(
role_id
),
'未知'
)
@register.filter
(
name
=
'to_avatar'
)
def
to_avatar
(
role_id
):
def
to_avatar
(
role_id
=
'0'
):
role_dict
=
{
'0'
:
'user'
,
'1'
:
'admin'
,
'2'
:
'root'
}
return
role_dict
.
get
(
str
(
role_id
),
'user'
)
static/js/base.js
View file @
458ca42f
...
...
@@ -107,3 +107,9 @@ function move_all(from, to){
});
}
//function commit_select(form_array){
// $('#{0} option'.format(form_array)).each(function(){
// $(this).prop('selected', true)
// })
//}
templates/juser/group_edit.html
View file @
458ca42f
...
...
@@ -87,7 +87,7 @@
<div
class=
"form-group"
>
<div
class=
"col-sm-4 col-sm-offset-2"
>
<button
class=
"btn btn-white"
type=
"reset"
>
取消
</button>
<button
id=
"submit_button"
class=
"btn btn-primary"
type=
"submit"
>
确认保存
</button>
<button
id=
"submit_button"
class=
"btn btn-primary"
type=
"submit"
>
确认保存
</button>
</div>
</div>
</form>
...
...
@@ -120,9 +120,9 @@ $('#groupForm').validator({
}
});
$
(
document
).
ready
(
function
(){
$
(
"#submit_button"
).
click
(
function
()
{
$
(
'#users_selected option'
).
each
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
"#submit_button"
).
click
(
function
()
{
$
(
'#users_selected option'
).
each
(
function
()
{
$
(
this
).
prop
(
'selected'
,
true
)
})
})
...
...
templates/juser/user_add.html
View file @
458ca42f
...
...
@@ -86,7 +86,7 @@
</div>
<div
class=
"hr-line-dashed"
></div>
<div
class=
"form-group"
>
<label
for=
"groups"
class=
"col-lg-2 control-label"
>
用户
组
</label>
<label
for=
"groups"
class=
"col-lg-2 control-label"
>
小
组
</label>
<div
class=
"col-sm-8"
>
<select
id=
"groups"
name=
"groups"
class=
"form-control m-b"
multiple
size=
"12"
>
{% for group in auth_groups %}
...
...
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