Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2b7a692c
authored
Sep 01, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: add inline help texts
parent
5aee89e2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
circle/dashboard/forms.py
+8
-1
circle/dashboard/templates/dashboard/group-create.html
+6
-0
circle/dashboard/views.py
+4
-4
No files found.
circle/dashboard/forms.py
View file @
2b7a692c
...
...
@@ -176,7 +176,14 @@ class GroupCreateForm(forms.ModelForm):
self
.
fields
[
'org_id'
]
=
forms
.
ChoiceField
(
# TRANSLATORS: directory like in LDAP
choices
=
choices
,
required
=
False
,
label
=
_
(
'Directory identifier'
))
if
not
new_groups
:
if
new_groups
:
self
.
fields
[
'org_id'
]
.
help_text
=
_
(
"If you select an item here, the members of this directory "
"group will be automatically added to the group at the time "
"they log in. Please note that other users (those with "
"permissions like yours) may also automatically become a "
"group co-owner)."
)
else
:
self
.
fields
[
'org_id'
]
.
widget
=
HiddenInput
()
def
save
(
self
,
commit
=
True
):
...
...
circle/dashboard/templates/dashboard/group-create.html
View file @
2b7a692c
{% load crispy_forms_tags %}
{% load i18n %}
<p
class=
"text-muted"
>
{% trans "User groups allow sharing templates or other resources with multiple users at once." %}
</p>
<form
method=
"POST"
action=
"{% url "
dashboard
.
views
.
group-create
"
%}"
>
{% csrf_token %}
...
...
circle/dashboard/views.py
View file @
2b7a692c
...
...
@@ -1361,7 +1361,7 @@ class TemplateChoose(LoginRequiredMixin, TemplateView):
self
.
request
.
user
)
context
.
update
({
'box_title'
:
_
(
'Choose template'
),
'ajax_title'
:
Fals
e
,
'ajax_title'
:
Tru
e
,
'template'
:
"dashboard/_template-choose.html"
,
'templates'
:
templates
.
all
(),
})
...
...
@@ -1890,7 +1890,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
context
.
update
({
'template'
:
'dashboard/_vm-create-2.html'
,
'box_title'
:
_
(
'Customize VM'
),
'ajax_title'
:
Fals
e
,
'ajax_title'
:
Tru
e
,
'vm_create_form'
:
form
,
'template_o'
:
templates
.
get
(
pk
=
template
),
})
...
...
@@ -1898,7 +1898,7 @@ class VmCreate(LoginRequiredMixin, TemplateView):
context
.
update
({
'template'
:
'dashboard/_vm-create-1.html'
,
'box_title'
:
_
(
'Create a VM'
),
'ajax_title'
:
Fals
e
,
'ajax_title'
:
Tru
e
,
'templates'
:
templates
.
all
(),
})
return
self
.
render_to_response
(
context
)
...
...
@@ -2090,7 +2090,7 @@ class GroupCreate(GroupCodeMixin, LoginRequiredMixin, TemplateView):
'template'
:
'dashboard/group-create.html'
,
'box_title'
:
'Create a Group'
,
'form'
:
form
,
'ajax_title'
:
True
,
})
return
self
.
render_to_response
(
context
)
...
...
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