From: Benoît Pin Date: Wed, 9 Apr 2014 14:45:38 +0000 (+0200) Subject: On s'assure que le dossier des pièces jointes existe. X-Git-Url: https://scm.cri.mines-paristech.fr/git/Plinn.git/commitdiff_plain/0f2a8853f243d533e0348c043c3e42175dcb17a5?ds=inline;hp=--cc On s'assure que le dossier des pièces jointes existe. --- 0f2a8853f243d533e0348c043c3e42175dcb17a5 diff --git a/skins/custom_content/document_edit_form.py b/skins/custom_content/document_edit_form.py index d652e57..d439bd7 100644 --- a/skins/custom_content/document_edit_form.py +++ b/skins/custom_content/document_edit_form.py @@ -1,25 +1,28 @@ ##parameters=change='', change_and_view='', ajax='' -## +from Products.CMFCore.utils import getToolByName +atool = getToolByName(context, 'portal_attachment') +attachments = atool.getAttachmentsFor(context) + form = context.REQUEST.form text = form.get('text') if text and same_type(text, []) : - # when javascript is disabled, - # there's a hidden textarea from epoz - # and an other from