Commit fd8a53cc authored by Vincent Pelletier's avatar Vincent Pelletier

Remove useless code introduced in my last commit.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8257 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3509d14c
...@@ -244,9 +244,6 @@ from Products.Formulator.Validator import BooleanValidator ...@@ -244,9 +244,6 @@ from Products.Formulator.Validator import BooleanValidator
def BooleanValidator_validate(self, field, key, REQUEST): def BooleanValidator_validate(self, field, key, REQUEST):
result = REQUEST.get(key, REQUEST.get('default_%s' % (key, ))) result = REQUEST.get(key, REQUEST.get('default_%s' % (key, )))
if result is None: if result is None:
if field.get_value('required'):
raise Exception, 'Required field %s has not been transmitted. Check that all required fields are in visible groups.' % (repr(field.id), )
else:
raise KeyError, 'Field %s is not present in request object.' % (repr(field.id), ) raise KeyError, 'Field %s is not present in request object.' % (repr(field.id), )
if (not not result)==True: if (not not result)==True:
return 1 return 1
...@@ -283,15 +280,6 @@ def CheckBoxWidget_render(self, field, key, value, REQUEST): ...@@ -283,15 +280,6 @@ def CheckBoxWidget_render(self, field, key, value, REQUEST):
CheckBoxWidget.render = CheckBoxWidget_render CheckBoxWidget.render = CheckBoxWidget_render
if 'required' not in CheckBoxWidget.property_names:
CheckBoxWidget.property_names = CheckBoxWidget.property_names + ['required']
CheckBoxWidget.required = fields.CheckBoxField('required',
title='Required',
description=(
"Enforces the need for the field to be rendered."),
default=0)
# Patch the render_view of a TextAreaWidget so that # Patch the render_view of a TextAreaWidget so that
# it is rendered as a nice box, it is using the tag # it is rendered as a nice box, it is using the tag
# readonly understood by most browsers for a text area # readonly understood by most browsers for a text area
......
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