Commit 2a835360 authored by Vincent Pelletier's avatar Vincent Pelletier

(Multi|)RelationField: Cleanup imports.

parent 7e414004
...@@ -35,11 +35,9 @@ from Products.PythonScripts.Utility import allow_class ...@@ -35,11 +35,9 @@ from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from types import StringType from types import StringType
from zLOG import LOG
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.ERP5Type.Globals import get_request from Products.ERP5Type.Globals import get_request
from AccessControl import Unauthorized import json
from AccessControl import getSecurityManager
# Max. number of catalog result # Max. number of catalog result
MAX_SELECT = 30 MAX_SELECT = 30
...@@ -369,7 +367,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget, ...@@ -369,7 +367,6 @@ class MultiRelationStringFieldWidget(Widget.LinesTextAreaWidget,
only erp5_autocompletion_ui bt5 to be installed only erp5_autocompletion_ui bt5 to be installed
""" """
# XXX: Allow to specify more parameters to jquery-ui autocomplete widget? # XXX: Allow to specify more parameters to jquery-ui autocomplete widget?
import json
return """ return """
<script type="text/javascript"> <script type="text/javascript">
$(document).ready(function() { $(document).ready(function() {
......
...@@ -29,19 +29,10 @@ ...@@ -29,19 +29,10 @@
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Products.Formulator.DummyField import fields
from Products.ERP5Type.Utils import convertToUpperCase
from Products.CMFCore.utils import getToolByName
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from Products.ERP5Type.Message import Message
from Products.ERP5Form import MultiRelationField from Products.ERP5Form import MultiRelationField
from Products.ERP5Form.MultiRelationField import MAX_SELECT, \ from Products.ERP5Form.MultiRelationField import SUB_FIELD_ID, ITEM_ID
NEW_CONTENT_PREFIX, \
SUB_FIELD_ID, ITEM_ID, \
NO_VALUE
from types import StringType
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from zLOG import LOG
class RelationStringFieldWidget( class RelationStringFieldWidget(
MultiRelationField.MultiRelationStringFieldWidget): MultiRelationField.MultiRelationStringFieldWidget):
...@@ -58,8 +49,6 @@ class RelationStringFieldWidget( ...@@ -58,8 +49,6 @@ class RelationStringFieldWidget(
default = Widget.TextWidget.default default = Widget.TextWidget.default
def _generateRenderValueList(self, field, key, value, REQUEST): def _generateRenderValueList(self, field, key, value, REQUEST):
# value = value or NO_VALUE
if REQUEST.get( if REQUEST.get(
'read_only_%s' % REQUEST.get( 'read_only_%s' % REQUEST.get(
'field__proxyfield_%s_%s_default' % (field.id, field._p_oid), 'field__proxyfield_%s_%s_default' % (field.id, field._p_oid),
......
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