Commit a96aa643 authored by Jérome Perrin's avatar Jérome Perrin

DateTimeField: timezone should not be required

at same time, rename gmt_timezones to all_timezones
parent 1a5f3038
...@@ -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")
......
...@@ -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',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment