Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
a96aa643
Commit
a96aa643
authored
Oct 09, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DateTimeField: timezone should not be required
at same time, rename gmt_timezones to all_timezones
parent
1a5f3038
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
product/Formulator/StandardFields.py
product/Formulator/StandardFields.py
+2
-2
product/Formulator/Widget.py
product/Formulator/Widget.py
+3
-4
No files found.
product/Formulator/StandardFields.py
View file @
a96aa643
...
@@ -234,7 +234,7 @@ def create_datetime_text_sub_form():
...
@@ -234,7 +234,7 @@ def create_datetime_text_sub_form():
title
=
"Timezone"
,
title
=
"Timezone"
,
required
=
0
,
required
=
0
,
default
=
'GMT'
,
default
=
'GMT'
,
items
=
Widget
.
gmt
_timezones
,
items
=
Widget
.
all
_timezones
,
size
=
1
)
size
=
1
)
sub_form
.
add_fields
([
hour
,
minute
,
ampm
,
timezone
],
"time"
)
sub_form
.
add_fields
([
hour
,
minute
,
ampm
,
timezone
],
"time"
)
return
sub_form
return
sub_form
...
@@ -292,7 +292,7 @@ def create_datetime_list_sub_form():
...
@@ -292,7 +292,7 @@ def create_datetime_list_sub_form():
title
=
"Timezone"
,
title
=
"Timezone"
,
required
=
0
,
required
=
0
,
default
=
'GMT'
,
default
=
'GMT'
,
items
=
Widget
.
gmt
_timezones
,
items
=
Widget
.
all
_timezones
,
size
=
1
)
size
=
1
)
sub_form
.
add_group
(
"time"
)
sub_form
.
add_group
(
"time"
)
...
...
product/Formulator/Widget.py
View file @
a96aa643
...
@@ -1282,7 +1282,7 @@ class MultiCheckBoxWidget(MultiItemsWidget):
...
@@ -1282,7 +1282,7 @@ class MultiCheckBoxWidget(MultiItemsWidget):
MultiCheckBoxWidgetInstance
=
MultiCheckBoxWidget
()
MultiCheckBoxWidgetInstance
=
MultiCheckBoxWidget
()
gmt_timezones
=
[(
x
,
x
)
for
x
in
sorted
(
set
(
Timezones
()))]
all_timezones
=
[(
''
,
''
)]
+
[(
x
,
x
)
for
x
in
sorted
(
set
(
Timezones
()))]
class
DateTimeWidget
(
Widget
):
class
DateTimeWidget
(
Widget
):
"""
"""
...
@@ -1369,9 +1369,8 @@ class DateTimeWidget(Widget):
...
@@ -1369,9 +1369,8 @@ class DateTimeWidget(Widget):
title
=
"Default Timezone"
,
title
=
"Default Timezone"
,
description
=
(
description
=
(
"The default timezone display when inputing a new date"
),
"The default timezone display when inputing a new date"
),
default
=
"GMT"
,
default
=
""
,
items
=
gmt_timezones
,
items
=
all_timezones
,
required
=
1
,
size
=
1
)
size
=
1
)
input_order
=
fields
.
ListField
(
'input_order'
,
input_order
=
fields
.
ListField
(
'input_order'
,
...
...
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