Commit 161973f7 authored by Romain Courteaud's avatar Romain Courteaud

Remove deprecated extra_context parameter on ProxyField.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12573 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 66c0c44e
......@@ -78,9 +78,6 @@ def get_value(self, id, **kw):
except AttributeError :
LOG('ERP5Form', 0,
'portal_preferences not put in TALES context (not installed?)')
extra_context = REQUEST.other.get('erp5_extra_context', None)
if extra_context:
kw.update(extra_context)
# This allows to pass some pointer to the local object
# through the REQUEST parameter. Not very clean.
# Used by ListBox to render different items in a list
......
......@@ -60,7 +60,6 @@ class ProxyWidget(Widget.Widget):
'form_id',
'field_id',
'target',
'extra_context',
]
form_id = fields.StringField(
......@@ -79,15 +78,6 @@ class ProxyWidget(Widget.Widget):
default="",
required=1)
# XXX FIXME This seems against the definition of proxy field...
# Remove it as soon as possible
extra_context = fields.ListTextAreaField(
'extra_context',
title='Extra Context (deprecated)',
description='Additional context variables.',
default=(),
required=0)
target = fields.HyperLinkField(
'target',
title='Proxy Target',
......@@ -103,7 +93,6 @@ class ProxyWidget(Widget.Widget):
result = ''
proxy_field = field.getRecursiveTemplateField()
if proxy_field is not None:
REQUEST = field.updateContext(REQUEST)
result = proxy_field.widget.render(field, key, value, REQUEST)
return result
......@@ -114,7 +103,6 @@ class ProxyWidget(Widget.Widget):
result = ''
proxy_field = field.getRecursiveTemplateField()
if proxy_field is not None:
REQUEST = field.updateContext(REQUEST)
result = proxy_field.widget.render_htmlgrid(field, key, value, REQUEST)
return result
......@@ -136,7 +124,6 @@ class ProxyValidator(Validator.Validator):
def validate(self, field, key, REQUEST):
proxy_field = field.getTemplateField()
REQUEST = field.updateContext(REQUEST)
try:
result = proxy_field.validator.validate(field, key, REQUEST)
except ValidationError, error:
......@@ -432,15 +419,6 @@ class ProxyField(ZMIField):
else:
return ZMIField.get_error_message(self, name)
def updateContext(self, REQUEST):
"""
Update the REQUEST
"""
extra_context = REQUEST.other.get('erp5_extra_context', {})
for k, v in self.get_value('extra_context'):
extra_context[k] = v
REQUEST.other['erp5_extra_context'] = extra_context
return REQUEST
security.declareProtected('Edit target', 'manage_edit_target')
def manage_edit_target(self, REQUEST):
......
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