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
999a46e0
authored
Sep 11, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
network: i18n for forms
parent
2bfa1d25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
circle/network/forms.py
+30
-29
No files found.
circle/network/forms.py
View file @
999a46e0
...
...
@@ -17,6 +17,7 @@
from
django.forms
import
ModelForm
from
django.core.urlresolvers
import
reverse_lazy
from
django.utils.translation
import
ugettext_lazy
as
_
from
crispy_forms.helper
import
FormHelper
from
crispy_forms.layout
import
Layout
,
Fieldset
,
Div
,
Submit
,
BaseInput
...
...
@@ -56,8 +57,8 @@ class BlacklistItemForm(ModelForm):
)
),
FormActions
(
Submit
(
'submit'
,
'Save changes'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.blacklist_list'
))
Submit
(
'submit'
,
_
(
'Save changes'
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.blacklist_list'
))
)
)
...
...
@@ -77,8 +78,8 @@ class DomainForm(ModelForm):
),
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.domain_list'
))
Submit
(
'submit'
,
_
(
'Save'
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.domain_list'
))
)
)
...
...
@@ -91,15 +92,15 @@ class GroupForm(ModelForm):
helper
.
layout
=
Layout
(
Div
(
Fieldset
(
'
Identity
'
,
''
,
'name'
,
'description'
,
'owner'
,
),
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.group_list'
))
Submit
(
'submit'
,
_
(
'Save'
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.group_list'
))
)
)
...
...
@@ -112,13 +113,13 @@ class HostForm(ModelForm):
helper
.
layout
=
Layout
(
Div
(
Fieldset
(
'
Identity
'
,
''
,
'hostname'
,
'reverse'
,
'mac'
,
),
Fieldset
(
'Network'
,
_
(
'Network'
)
,
'vlan'
,
'ipv4'
,
'ipv6'
,
...
...
@@ -126,7 +127,7 @@ class HostForm(ModelForm):
'external_ipv4'
,
),
Fieldset
(
'Information'
,
_
(
'Information'
)
,
'description'
,
'location'
,
'comment'
,
...
...
@@ -134,8 +135,8 @@ class HostForm(ModelForm):
),
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.host_list'
)))
Submit
(
'submit'
,
_
(
'Save'
)
),
LinkButton
(
'back'
,
_
(
'Back'
)
,
reverse_lazy
(
'network.host_list'
)))
)
class
Meta
:
...
...
@@ -159,8 +160,8 @@ class RecordForm(ModelForm):
)
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.record_list'
))
Submit
(
'submit'
,
_
(
"Save"
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.record_list'
))
)
)
...
...
@@ -173,7 +174,7 @@ class RuleForm(ModelForm):
helper
.
layout
=
Layout
(
Div
(
Fieldset
(
'
Identity
'
,
''
,
'direction'
,
'description'
,
'foreign_network'
,
...
...
@@ -189,7 +190,7 @@ class RuleForm(ModelForm):
'nat_external_ipv4'
,
),
Fieldset
(
'External'
,
_
(
'External'
)
,
'vlan'
,
'vlangroup'
,
'host'
,
...
...
@@ -198,8 +199,8 @@ class RuleForm(ModelForm):
)
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.rule_list'
))
Submit
(
'submit'
,
_
(
"Save"
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.rule_list'
))
)
)
...
...
@@ -219,8 +220,8 @@ class SwitchPortForm(ModelForm):
)
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
Submit
(
'submit'
,
_
(
"Save"
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.switch_port_list'
))
)
)
...
...
@@ -234,32 +235,32 @@ class VlanForm(ModelForm):
helper
.
layout
=
Layout
(
Div
(
Fieldset
(
'
Identity
'
,
''
,
'name'
,
'vid'
,
'network_type'
,
'managed'
,
),
Fieldset
(
'IPv4'
,
_
(
'IPv4'
)
,
'network4'
,
'snat_to'
,
'snat_ip'
,
'dhcp_pool'
,
),
Fieldset
(
'IPv6'
,
_
(
'IPv6'
)
,
'network6'
,
'ipv6_template'
,
'host_ipv6_prefixlen'
,
),
Fieldset
(
'Domain name service'
,
_
(
'Domain name service'
)
,
'domain'
,
'reverse_domain'
,
),
Fieldset
(
'Info'
,
_
(
'Info'
)
,
'description'
,
'comment'
,
'owner'
,
...
...
@@ -268,8 +269,8 @@ class VlanForm(ModelForm):
),
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
'network.vlan_list'
))
Submit
(
'submit'
,
_
(
"Save"
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.vlan_list'
))
)
)
...
...
@@ -290,8 +291,8 @@ class VlanGroupForm(ModelForm):
)
),
FormActions
(
Submit
(
'submit'
,
'Save'
),
LinkButton
(
'back'
,
'Back'
,
reverse_lazy
(
Submit
(
'submit'
,
_
(
"Save"
)
),
LinkButton
(
'back'
,
_
(
"Back"
)
,
reverse_lazy
(
'network.vlan_group_list'
))
)
)
...
...
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