From b74cfaf7921d95cba593f6e8ccf871c914931871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Salvador?= Date: Wed, 18 Sep 2013 12:02:47 +0200 Subject: [PATCH] factorization --- htdocs/societe/document.php | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/htdocs/societe/document.php b/htdocs/societe/document.php index 6ddf67c2133..0605592e4d7 100644 --- a/htdocs/societe/document.php +++ b/htdocs/societe/document.php @@ -149,26 +149,10 @@ if ($object->id) print ''; - /* - * Confirmation suppression fichier - */ - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&urlfile='.urlencode(GETPOST("urlfile")), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', 0, 1); - } - - $formfile=new FormFile($db); - - // Show upload form - $formfile->form_attach_new_file($_SERVER["PHP_SELF"].'?id='.$object->id,'',0,0,$user->rights->societe->creer,50,$object); - - //TODO FACTORIZE THIS - // List of document - $formfile->list_of_documents($filearray,$object,'societe'); - - print "
"; - $formfile->list_of_links($object); - print "
"; + $modulepart = 'societe'; + $permission = $user->rights->societe->creer; + $param = '&id=' . $object->id; + include DOL_DOCUMENT_ROOT . '/core/tpl/doc2.tpl.php'; } else {