Commit c1449d3a authored by Romain Courteaud's avatar Romain Courteaud

Add comment about DurationField.

Please do not use this field, which it unstable and unsafe.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17463 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 354d9d3c
...@@ -50,7 +50,20 @@ class DurationWidget(FormulatorPatch.IntegerWidget): ...@@ -50,7 +50,20 @@ class DurationWidget(FormulatorPatch.IntegerWidget):
The field purpose is to display second quantity in hour, minute and second, The field purpose is to display second quantity in hour, minute and second,
in order to make it more readable. in order to make it more readable.
XXX This field is experimental, and unstable.
Do not use it.
""" """
title = fields.StringField('title',
title='Title. ' \
'(Warning! Do not use this field!)',
description=(
"The title of this field. This is the title of the field that "
"will appear in the form when it is displayed. Required."),
default="",
required=1)
def render_view(self, field, value): def render_view(self, field, value):
sub_field_render_list = [] sub_field_render_list = []
for title, sub_key, convertion in (('Hour', 'hour', HOUR_IN_SECOND), for title, sub_key, convertion in (('Hour', 'hour', HOUR_IN_SECOND),
......
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