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
Commit
c263370d
authored
Mar 23, 2021
by
Máhonfai Bálint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group import form
parent
c2fefe47
Pipeline
#1426
passed with stage
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
circle/dashboard/forms.py
+17
-0
No files found.
circle/dashboard/forms.py
View file @
c263370d
...
@@ -255,6 +255,23 @@ class GroupCreateForm(NoFormTagMixin, forms.ModelForm):
...
@@ -255,6 +255,23 @@ class GroupCreateForm(NoFormTagMixin, forms.ModelForm):
fields
=
(
'name'
,)
fields
=
(
'name'
,)
class
GroupImportForm
(
NoFormTagMixin
,
forms
.
Form
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
user
=
kwargs
.
pop
(
"user"
)
super
(
GroupImportForm
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
exported_group_paths
=
Store
(
self
.
user
)
.
get_files_with_exts
([
"group"
])
exported_group_names
=
[
os
.
path
.
basename
(
item
)
for
item
in
exported_group_paths
]
self
.
choices
=
zip
(
exported_group_paths
,
exported_group_names
)
self
.
fields
[
"group_path"
]
=
forms
.
ChoiceField
(
label
=
_
(
"Group to import"
),
choices
=
self
.
choices
)
class
GroupProfileUpdateForm
(
NoFormTagMixin
,
forms
.
ModelForm
):
class
GroupProfileUpdateForm
(
NoFormTagMixin
,
forms
.
ModelForm
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
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