Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_rtl_support
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Romain Courteaud
erp5_rtl_support
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
Hide 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():
title
=
"Timezone"
,
required
=
0
,
default
=
'GMT'
,
items
=
Widget
.
gmt
_timezones
,
items
=
Widget
.
all
_timezones
,
size
=
1
)
sub_form
.
add_fields
([
hour
,
minute
,
ampm
,
timezone
],
"time"
)
return
sub_form
...
...
@@ -292,7 +292,7 @@ def create_datetime_list_sub_form():
title
=
"Timezone"
,
required
=
0
,
default
=
'GMT'
,
items
=
Widget
.
gmt
_timezones
,
items
=
Widget
.
all
_timezones
,
size
=
1
)
sub_form
.
add_group
(
"time"
)
...
...
product/Formulator/Widget.py
View file @
a96aa643
...
...
@@ -1282,7 +1282,7 @@ class MultiCheckBoxWidget(MultiItemsWidget):
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
):
"""
...
...
@@ -1369,9 +1369,8 @@ class DateTimeWidget(Widget):
title
=
"Default Timezone"
,
description
=
(
"The default timezone display when inputing a new date"
),
default
=
"GMT"
,
items
=
gmt_timezones
,
required
=
1
,
default
=
""
,
items
=
all_timezones
,
size
=
1
)
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