Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
5b11e755
authored
May 30, 2014
by
Őry Máté
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: allow setting description at group creation
parent
9deb2f3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
circle/dashboard/forms.py
+8
-5
No files found.
circle/dashboard/forms.py
View file @
5b11e755
...
@@ -315,6 +315,9 @@ class VmCustomizeForm(forms.Form):
...
@@ -315,6 +315,9 @@ class VmCustomizeForm(forms.Form):
class
GroupCreateForm
(
forms
.
ModelForm
):
class
GroupCreateForm
(
forms
.
ModelForm
):
description
=
forms
.
CharField
(
label
=
_
(
"Description"
),
required
=
False
,
widget
=
forms
.
Textarea
(
attrs
=
{
'rows'
:
3
}))
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
new_groups
=
kwargs
.
pop
(
'new_groups'
,
None
)
new_groups
=
kwargs
.
pop
(
'new_groups'
,
None
)
super
(
GroupCreateForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
super
(
GroupCreateForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
@@ -332,11 +335,11 @@ class GroupCreateForm(forms.ModelForm):
...
@@ -332,11 +335,11 @@ class GroupCreateForm(forms.ModelForm):
raise
AttributeError
(
'Committing is mandatory.'
)
raise
AttributeError
(
'Committing is mandatory.'
)
group
=
super
(
GroupCreateForm
,
self
)
.
save
()
group
=
super
(
GroupCreateForm
,
self
)
.
save
()
orgid
=
self
.
cleaned_data
[
'org_id'
]
profile
=
group
.
profile
if
orgid
:
# multiple blanks were not be unique unlike NULLs are
profile
=
group
.
profil
e
profile
.
org_id
=
self
.
cleaned_data
[
'org_id'
]
or
Non
e
profile
.
org_id
=
orgid
profile
.
description
=
self
.
cleaned_data
[
'description'
]
profile
.
save
()
profile
.
save
()
return
group
return
group
...
...
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