X-Git-Url: https://svn.cri.ensmp.fr/git/Plinn.git/blobdiff_plain/0f2a8853f243d533e0348c043c3e42175dcb17a5..1a0790a4a065c0d2e8a45b08188791b51a35bc29:/skins/custom_content/document_edit_form.py?ds=sidebyside diff --git a/skins/custom_content/document_edit_form.py b/skins/custom_content/document_edit_form.py index d439bd7..c23a9a3 100644 --- a/skins/custom_content/document_edit_form.py +++ b/skins/custom_content/document_edit_form.py @@ -11,18 +11,10 @@ if text and same_type(text, []) : # and an other from <noscript> tag form.update({'text' : text[1]}) -if change and \ - context.validateTextFile(**form) and \ - context.validateHTML(**form) and \ - context.document_edit_control(text=form.get('text'), text_format='html') and \ - context.setRedirect(context, 'object/edit', **{'ajax':ajax}): - return -elif change_and_view and \ - context.validateTextFile(**form) and \ - context.validateHTML(**form) and \ - context.document_edit_control(text=form.get('text'), text_format='html') and \ - context.setRedirect(context, 'object/view', **{'ajax':ajax}): - return +if change_and_view and \ + context.document_edit_control(text=form.get('text'), text_format='html') : + attachments.removeUnusedAttachments(context.EditableBody()) + return context.setRedirect(context, 'object/view', **{'ajax':ajax}) options = {}