From e58de66f38a970d19e7d955d84e6f5a1c8ba1242 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 18 Mar 2016 16:32:55 +0100 Subject: [PATCH 1/2] call printDropFolderChooserJs only if dropfolder is set --- views/bootstrap/class.AddDocument.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index e835f0b36..472a32303 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -75,7 +75,9 @@ $(document).ready(function() { }); printKeywordChooserJs("form1"); - $this->printDropFolderChooserJs("form1"); + if($dropfolderdir) { + $this->printDropFolderChooserJs("form1"); + } } /* }}} */ function show() { /* {{{ */ From 513ed0c4e14dfba2c09e0e375dadcd7f2a90d641 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 18 Mar 2016 16:39:22 +0100 Subject: [PATCH 2/2] get $dropfolderdir from view in js() --- views/bootstrap/class.AddDocument.php | 1 + 1 file changed, 1 insertion(+) diff --git a/views/bootstrap/class.AddDocument.php b/views/bootstrap/class.AddDocument.php index 472a32303..eec00138b 100644 --- a/views/bootstrap/class.AddDocument.php +++ b/views/bootstrap/class.AddDocument.php @@ -32,6 +32,7 @@ require_once("class.Bootstrap.php"); class SeedDMS_View_AddDocument extends SeedDMS_Bootstrap_Style { function js() { /* {{{ */ + $dropfolderdir = $this->params['dropfolderdir']; header('Content-Type: application/javascript; charset=UTF-8'); ?> function checkForm()