From 0f2a8853f243d533e0348c043c3e42175dcb17a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Wed, 9 Apr 2014 16:45:38 +0200 Subject: [PATCH] =?utf8?q?On=20s'assure=20que=20le=20dossier=20des=20pi?= =?utf8?q?=C3=A8ces=20jointes=20existe.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/custom_content/document_edit_form.py | 35 ++++++++++++---------- 1 file changed, 19 insertions(+), 16 deletions(-) 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