Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7a3602eb
authored
Sep 03, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-improve-inline-helps' into 'master'
Feature Improve Inline Helps
🚧
halp!
parents
6278f2fc
a7b16627
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
circle/dashboard/forms.py
+8
-1
circle/dashboard/templates/dashboard/group-create.html
+6
-0
circle/dashboard/views.py
+5
-5
No files found.
circle/dashboard/forms.py
View file @
7a3602eb
...
...
@@ -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 @
7a3602eb
{% 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 @
7a3602eb
...
...
@@ -1483,7 +1483,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
(),
})
...
...
@@ -2039,7 +2039,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
),
})
...
...
@@ -2047,7 +2047,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
)
...
...
@@ -2237,9 +2237,9 @@ class GroupCreate(GroupCodeMixin, LoginRequiredMixin, TemplateView):
context
=
self
.
get_context_data
(
**
kwargs
)
context
.
update
({
'template'
:
'dashboard/group-create.html'
,
'box_title'
:
'Create a Group'
,
'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