Commit 77969151 authored by Jérome Perrin's avatar Jérome Perrin

ERP5Form/Form: remove non used methods

parent 4f721c9a
Pipeline #25192 failed with stage
in 0 seconds
...@@ -760,66 +760,9 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate): ...@@ -760,66 +760,9 @@ class ERP5Form(Base, ZMIForm, ZopePageTemplate):
raise FormValidationError(errors, result) raise FormValidationError(errors, result)
return result return result
security.declareProtected('View', 'hash_validated_data')
def hash_validated_data(self, validated_data):
return hashlib.sha256(
"".join(
str(validated_data[key])
for key in sorted(validated_data.keys())
if isinstance(validated_data[key], (six.text_type, six.binary_type, float, DateTime) + six.integer_types))
).hexdigest()
# FTP/DAV Access # FTP/DAV Access
manage_FTPget = ZMIForm.get_xml manage_FTPget = ZMIForm.get_xml
def PUT(self, REQUEST, RESPONSE):
"""Handle HTTP PUT requests."""
self.dav__init(REQUEST, RESPONSE)
self.dav__simpleifhandler(REQUEST, RESPONSE, refresh=1)
if REQUEST.environ['REQUEST_METHOD'] != 'PUT':
raise Forbidden('REQUEST_METHOD should be PUT.')
body=REQUEST.get('BODY', '')
# Empty the form (XMLToForm is unable to empty things before reopening)
for k in self.get_field_ids():
try:
self._delObject(k)
except AttributeError:
pass
self.groups = {}
self.group_list = []
# And reimport
XMLToForm(body, self)
self.ZCacheable_invalidate()
RESPONSE.setStatus(204)
return RESPONSE
manage_FTPput = PUT
security.declarePrivate('getSimilarSkinFolderIdList')
def getSimilarSkinFolderIdList(self):
"""
Find other skins id installed in the same time
"""
portal = self.getPortalObject()
folder_id = self.aq_parent.id
# Find a business template which manages the context skin folder.
folder_id_set = {folder_id}
for template in portal.portal_templates.getInstalledBusinessTemplateList():
template_skin_id_list = template.getTemplateSkinIdList()
if folder_id in template_skin_id_list:
folder_id_set.update(template_skin_id_list)
# Find folders which can be surcharged by this skin folder
if '_' in folder_id:
surcharged_folder_id = 'erp5_%s' % folder_id.split('_')[-1]
if (surcharged_folder_id != folder_id) and \
(getattr(portal.portal_skins, surcharged_folder_id, None) \
is not None):
folder_id_set.add(surcharged_folder_id)
break
return list(folder_id_set)
#Methods for Proxify tab. #Methods for Proxify tab.
security.declareProtected('View management screens', 'getFormFieldList') security.declareProtected('View management screens', 'getFormFieldList')
def getFormFieldList(self): def getFormFieldList(self):
......
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