Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
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
c8df8f6e
authored
Aug 04, 2022
by
Fábián János
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In ChoiceField was changed initial tag to choices, where parameter is a list.
repaired: language chooser, tcp/udp chooser
parent
2a30103b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
circle/dashboard/forms.py
+5
-5
No files found.
circle/dashboard/forms.py
View file @
c8df8f6e
...
...
@@ -46,8 +46,8 @@ from django.forms.widgets import TextInput, HiddenInput
from
django.template.loader
import
render_to_string
from
django.utils.html
import
escape
,
format_html
from
django.utils.safestring
import
mark_safe
from
django.utils.t
ranslation
import
ugettex
t_lazy
from
django.utils.translation
import
u
gettext_lazy
as
_
from
django.utils.t
ext
import
forma
t_lazy
from
django.utils.translation
import
gettext_lazy
as
_
from
simplesshkey.models
import
UserKey
from
sizefield.widgets
import
FileSizeWidget
...
...
@@ -62,7 +62,7 @@ from vm.models import (
from
.models
import
Profile
,
GroupProfile
,
Message
from
.validators
import
domain_validator
,
meta_data_validator
,
user_data_validator
LANGUAGES_WITH_CODE
=
((
l
[
0
],
ugettext_lazy
(
l
[
1
],
" ("
,
l
[
0
],
")"
))
LANGUAGES_WITH_CODE
=
((
l
[
0
],
format_lazy
(
"{} ({})"
,
l
[
1
],
l
[
0
]
))
for
l
in
LANGUAGES
)
priority_choices
=
(
...
...
@@ -1103,7 +1103,7 @@ class VmPortRemoveForm(OperationForm):
class
VmPortAddForm
(
OperationForm
):
port
=
forms
.
IntegerField
(
required
=
True
,
label
=
_
(
'Port'
),
min_value
=
1
,
max_value
=
65535
)
proto
=
forms
.
ChoiceField
(
initial
=
((
'tcp'
,
'tcp'
),
(
'udp'
,
'udp'
)),
proto
=
forms
.
ChoiceField
(
choices
=
((
'tcp'
,
'tcp'
),
(
'udp'
,
'udp'
)),
required
=
True
,
label
=
_
(
'Protocol'
))
def
__init__
(
self
,
*
args
,
**
kwargs
):
...
...
@@ -1303,7 +1303,7 @@ class TraitForm(forms.ModelForm):
class
MyProfileForm
(
forms
.
ModelForm
):
preferred_language
=
forms
.
ChoiceField
(
initial
=
LANGUAGES_WITH_CODE
,
choices
=
LANGUAGES_WITH_CODE
,
label
=
_
(
"Preferred language"
),
)
...
...
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