[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator/Fields/Generic - DateTimeField.py:1.1.2.3 EmailField.py:1.1.2.3 FileField.py:1.1.2.3 FloatField.py:1.1.2.3 IntegerField.py:1.1.2.3 ListField.py:1.1.2.3 PasswordField.py:1.1.2.3 PatternField.py:1.1.2.3 StringField.py:1.1.2.3 CheckBoxField.py:NONE LinesField.py:NONE ListTextAreaField.py:NONE MultiCheckBoxField.py:NONE MultiListField.py:NONE RadioField.py:NONE RawTextAreaField.py:NONE TextAreaField.py:NONE
Stephan Richter
srichter@cbu.edu
Wed, 27 Mar 2002 09:24:08 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator/Fields/Generic
In directory cvs.zope.org:/tmp/cvs-serv9605/Fields/Generic
Modified Files:
Tag: Zope-3x-branch
DateTimeField.py EmailField.py FileField.py FloatField.py
IntegerField.py ListField.py PasswordField.py PatternField.py
StringField.py
Removed Files:
Tag: Zope-3x-branch
CheckBoxField.py LinesField.py ListTextAreaField.py
MultiCheckBoxField.py MultiListField.py RadioField.py
RawTextAreaField.py TextAreaField.py
Log Message:
Major changes in Formulator (for details see
srichter-OFS_Formulator-branch checkins):
- Created simple registries for validators, fields and so on.
- Made Formulator compatible with new Publisher code
- Adjusted for better usibility.
Note: More to come as Formulaot is bring developed.
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/DateTimeField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
-from Zope.App.Formulator.Validators import LinkValidator
-from DateTime import DateTime
+from Zope.App.Formulator.Field import Field
+from Zope.App.Formulator.Validators import DateTimeValidator
+import time
class DateTimeField(Field):
@@ -28,18 +28,8 @@
default = ''
title = 'DateTime Field'
description = 'DateTime Field'
- validator = Validator.DateTimeValidator()
+ validator = DateTimeValidator.DateTimeValidator()
- def __init__(self, id, **kw):
-
- apply(Field.__init__, (self, id), kw)
-
- if self.get_value('input_style') == 'text':
- self.sub_form = create_datetime_text_sub_form()
- elif value == 'list':
- self.sub_form = create_datetime_list_sub_form()
- else:
- assert 0, "Unknown input_style"
def on_value_input_style_changed(self, value):
if value == 'text':
@@ -57,7 +47,7 @@
"""
start_datetime = self.get_value('start_datetime')
end_datetime = self.get_value('end_datetime')
- current_year = DateTime().year()
+ current_year = time.gmtime(time.time())[0]
if start_datetime:
first_year = start_datetime.year()
else:
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/EmailField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import EmailValidator
class EmailField(Field):
- __implements__ = Field.__implements
+ __implements__ = Field.__implements__
id = None
default = ''
title = 'Email Field'
description = 'Email Field'
- validator = StringValidator.EmailValidator()
+ validator = EmailValidator.EmailValidator()
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/FileField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import FileValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/FloatField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import FloatValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/IntegerField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import IntegerValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/ListField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import SelectionValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/PasswordField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import StringValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/PatternField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import PatternValidator
=== Zope3/lib/python/Zope/App/Formulator/Fields/Generic/StringField.py 1.1.2.2 => 1.1.2.3 ===
"""
-from Zope.App.Formulator.Fields.Field import Field
+from Zope.App.Formulator.Field import Field
from Zope.App.Formulator.Validators import StringValidator
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/CheckBoxField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/LinesField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/ListTextAreaField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/MultiCheckBoxField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/MultiListField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/RadioField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/RawTextAreaField.py ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/Fields/Generic/TextAreaField.py ===