diff --git a/views/bootstrap/class.Bootstrap.php b/views/bootstrap/class.Bootstrap.php index 0a9f1e4ac..0dca01507 100644 --- a/views/bootstrap/class.Bootstrap.php +++ b/views/bootstrap/class.Bootstrap.php @@ -1232,9 +1232,9 @@ function folderSelected(id, name) { } /* }}} */ function getFolderChooserHtml($form, $accessMode, $exclude = -1, $default = false, $formname = '') { /* {{{ */ - $formid = "targetid".$form; if(!$formname) $formname = "targetid"; + $formid = $formname.$form; $content = ''; $content .= "getID() : "") ."\">"; $content .= "
\n"; @@ -1263,17 +1263,20 @@ function folderSelected(id, name) { echo self::getFolderChooserHtml($form, $accessMode, $exclude, $default, $formname); } /* }}} */ - function printFolderChooserJs($form) { /* {{{ */ + function printFolderChooserJs($form, $formname='') { /* {{{ */ + if(!$formname) + $formname = "targetid"; + $formid = $formname.$form; ?> function folderSelected(id, name) { - $('#targetid').val(id); + $('#').val(id); $('#choosefoldersearch').val(name); $('#folderChooser').modal('hide'); } $(document).ready(function() { $('#clearfolder').click(function(ev) { $('#choosefoldersearch').val(''); - $('#targetid').val(''); + $('#').val(''); }); }); contentHeading("", true); $this->contentContainerStart(); diff --git a/views/bootstrap/class.FolderChooser.php b/views/bootstrap/class.FolderChooser.php index 33f099022..88d9bc0c2 100644 --- a/views/bootstrap/class.FolderChooser.php +++ b/views/bootstrap/class.FolderChooser.php @@ -46,7 +46,7 @@ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style { $orderby = $this->params['orderby']; header('Content-Type: application/javascript'); - $this->printNewTreeNavigationJs($rootfolderid, $mode, 0, $form, '', $orderby); + $this->printNewTreeNavigationJs($rootfolderid, $mode, 0, $form, 0, $orderby); } /* }}} */ function show() { /* {{{ */ @@ -59,14 +59,8 @@ class SeedDMS_View_FolderChooser extends SeedDMS_Bootstrap_Style { $rootfolderid = $this->params['rootfolderid']; // $this->htmlStartPage(getMLText("choose_target_folder")); -// $this->contentContainerStart(); -if(1) { $this->printNewTreeNavigationHtml($rootfolderid, $mode, 0, $form, 0, $orderby); echo ''."\n"; -} else { - $this->printNewTreeNavigation($rootfolderid, $mode, 0, $form); -} -// $this->contentContainerEnd(); // $this->htmlEndPage(true); } /* }}} */ }