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
18d4d663
Commit
18d4d663
authored
Aug 09, 2019
by
jym503558564
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] 创建/更新 审计员,前端根据角色来判断是否可选择用户组
parent
8ef70755
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
_user.html
apps/users/templates/users/_user.html
+15
-1
No files found.
apps/users/templates/users/_user.html
View file @
18d4d663
...
@@ -61,6 +61,17 @@
...
@@ -61,6 +61,17 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
{%
static
"
css
/
plugins
/
daterangepicker
/
daterangepicker
.
css
"
%}
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
{%
static
"
css
/
plugins
/
daterangepicker
/
daterangepicker
.
css
"
%}
/>
<script>
<script>
var
role_id
=
'#'
+
'{{ form.role.id_for_label }}'
;
var
groups_id
=
'#'
+
'{{ form.groups.id_for_label }}'
;
function
fieldDisplay
(){
var
role
=
$
(
role_id
).
val
();
if
(
role
===
'Auditor'
){
$
(
groups_id
).
closest
(
'.form-group'
).
addClass
(
'hidden'
);
}
else
{
$
(
groups_id
).
closest
(
'.form-group'
).
removeClass
(
'hidden'
);
}}
var
dateOptions
=
{
var
dateOptions
=
{
singleDatePicker
:
true
,
singleDatePicker
:
true
,
showDropdowns
:
true
,
showDropdowns
:
true
,
...
@@ -76,7 +87,10 @@
...
@@ -76,7 +87,10 @@
$
(
'#id_date_expired'
).
daterangepicker
(
dateOptions
);
$
(
'#id_date_expired'
).
daterangepicker
(
dateOptions
);
var
mfa_radio
=
$
(
'#id_otp_level'
);
var
mfa_radio
=
$
(
'#id_otp_level'
);
mfa_radio
.
addClass
(
"form-inline"
);
mfa_radio
.
addClass
(
"form-inline"
);
mfa_radio
.
children
().
css
(
"margin-right"
,
"15px"
)
mfa_radio
.
children
().
css
(
"margin-right"
,
"15px"
);
fieldDisplay
()
}).
on
(
'change'
,
role_id
,
function
(){
fieldDisplay
();
})
})
</script>
</script>
{% endblock %}
{% endblock %}
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