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
154783a9
Commit
154783a9
authored
Sep 04, 2016
by
ibuler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify some and pull from server
parent
8d0334e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
69 additions
and
1 deletion
+69
-1
assetgroup_add.html
apps/assets/templates/assets/assetgroup_add.html
+67
-0
views.py
apps/assets/views.py
+2
-1
No files found.
apps/assets/templates/assets/assetgroup_add.html
0 → 100644
View file @
154783a9
{% extends 'base.html' %}
{% load i18n %}
{% load static %}
{% load bootstrap %}
{% block custom_head_css_js %}
<link
href=
"{% static "
css
/
plugins
/
select2
/
select2
.
min
.
css
"
%}"
rel=
"stylesheet"
>
<script
src=
"{% static "
js
/
plugins
/
select2
/
select2
.
full
.
min
.
js
"
%}"
></script>
{% endblock %}
{% block content %}
<div
class=
"wrapper wrapper-content animated fadeInRight"
>
<div
class=
"row"
>
<div
class=
"col-sm-12"
>
<div
class=
"ibox float-e-margins"
>
<div
class=
"ibox-title"
>
<h5>
{% trans 'Create asset group' %}
</h5>
<div
class=
"ibox-tools"
>
<a
class=
"collapse-link"
>
<i
class=
"fa fa-chevron-up"
></i>
</a>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-wrench"
></i>
</a>
<a
class=
"close-link"
>
<i
class=
"fa fa-times"
></i>
</a>
</div>
</div>
<div
class=
"ibox-content"
>
<form
method=
"post"
id=
"userForm"
class=
"form-horizontal"
action=
""
>
{% csrf_token %}
{{ form.name|bootstrap_horizontal }}
<div
class=
"form-group"
>
<label
for=
"users"
class=
"col-sm-2 control-label"
>
用户
</label>
<div
class=
"col-sm-9"
>
<select
name=
"users"
id=
"users"
data-placeholder=
"选择用户"
class=
"select2 form-control m-b"
multiple
tabindex=
"2"
>
{% for user in users %}
<option
value=
"{{ user.id }}"
>
{{ user.name }}
</option>
{% endfor %}
</select>
</div>
</div>
{{ form.comment|bootstrap_horizontal }}
<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>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block custom_foot_js %}
<script>
$
(
document
).
ready
(
function
()
{
$
(
'.select2'
).
select2
();
})
</script>
{% endblock %}
\ No newline at end of file
apps/assets/views.py
View file @
154783a9
...
...
@@ -37,7 +37,8 @@ class AssetDetailView(DetailView):
class
AssetGroupAddView
(
CreateView
):
pass
model
=
AssetGroup
template_name
=
'assets/assetgroup_add.html'
class
AssetGroupListView
(
ListView
):
...
...
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