From bd0064e5ab7dfbee18cecdc757f441dd8d317d24 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 27 Apr 2017 17:21:24 +0200 Subject: [PATCH] remove attachment upload --- views/bootstrap/class.AddDocument.php | 51 ++++++--------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 498e23b2d..7c048f3f9 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -37,26 +37,16 @@ class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { $maxuploadsize = $this->params['maxuploadsize']; $enablelargefileupload = $this->params['enablelargefileupload']; $enablemultiupload = $this->params['enablemultiupload']; - $enableattachmentupload = $this->params['enableattachmentupload']; header('Content-Type: application/javascript; charset=UTF-8'); if($enablelargefileupload) { $this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, $enablemultiupload); - if($enableattachmentupload) { - //$this->printFineUploaderJs('../op/op.UploadChunks.php', $partitionsize, $maxuploadsize, , $enablemultiupload, 'attachment'); - } } ?> $(document).ready(function() { $('#new-file').click(function(event) { $("#userfile-upload-file").clone().appendTo("#userfile-upload-files").removeAttr("id").children('div').children('input').val(''); }); - - $('#new-attachment').click(function(event) { -console.log('Hallo'); - $("#attachment-upload-file").clone().appendTo("#attachment-upload-files").removeAttr("id").children('div').children('input').val(''); - }); - jQuery.validator.addMethod("alternatives", function(value, element, params) { if(value == '' && params.val() == '') return false; @@ -96,9 +86,6 @@ console.log('Hallo'); ?> submitHandler: function(form) { userfileuploader.uploadStoredFiles(); - -// attachmentuploader.uploadStoredFiles(); - }, params['folder']; $enablelargefileupload = $this->params['enablelargefileupload']; $enablemultiupload = $this->params['enablemultiupload']; - $enableattachmentupload = $this->params['enableattachmentupload']; $enableadminrevapp = $this->params['enableadminrevapp']; $enableownerrevapp = $this->params['enableownerrevapp']; $enableselfrevapp = $this->params['enableselfrevapp']; @@ -348,7 +334,7 @@ console.log('Hallo'); $attrdefs = $dms->getAllAttributeDefinitions(array(SeedDMS_Core_AttributeDefinition::objtype_documentcontent, SeedDMS_Core_AttributeDefinition::objtype_all)); if($attrdefs) { foreach($attrdefs as $attrdef) { - $arr = $this->callHook('editDocumentAttribute', null, $attrdef); + $arr = $this->callHook('editDocumentContentAttribute', null, $attrdef); if(is_array($arr)) { echo ""; echo "".$arr[0].":"; @@ -364,32 +350,17 @@ console.log('Hallo'); } } } - /* Do not allow upload of attachments if multiple documents can be uploaded, - * because attachments cannot be assigned uniquely to a document */ - if($enableattachmentupload && !$enablemultiupload) { -?> - - - contentSubHeading(getMLText("linked_files")); ?> - - - - : - -printFineUploaderHtml('attachment'); - else { - $this->printFileChooser('attachment[]', false); -?> - -callHook('addDocumentContentAttributes', $folder); + if(is_array($arrs)) { + foreach($arrs as $arr) { + echo ""; + echo "".$arr[0].":"; + echo "".$arr[1].""; + echo ""; } -?> - - -