From 3fbc447d7770e614605ef9b3670fbd1bd439220f Mon Sep 17 00:00:00 2001 From: Tony Air Date: Fri, 21 Nov 2014 10:26:03 +0600 Subject: [PATCH] FIX getDisplayFolderName() UploadFiels requires getDisplayFolderName() function for server file selection popup Form. --- .../code/GridFieldBulkUpload_Request.php | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bulkUpload/code/GridFieldBulkUpload_Request.php b/bulkUpload/code/GridFieldBulkUpload_Request.php index 4e3dc17..07f546c 100644 --- a/bulkUpload/code/GridFieldBulkUpload_Request.php +++ b/bulkUpload/code/GridFieldBulkUpload_Request.php @@ -28,6 +28,14 @@ class GridFieldBulkUpload_Request extends RequestHandler */ protected $controller; + /** + * @var String Folder to display in "Select files" list. + * Defaults to listing all files regardless of folder. + * The folder path should be relative to the webroot. + * See {@link FileField->folderName} to set the upload target instead. + * @example admin/folder/subfolder + */ + protected $displayFolderName; /** * RequestHandler allowed actions @@ -73,6 +81,20 @@ class GridFieldBulkUpload_Request extends RequestHandler return $this->component->bulkUploadField($this->gridField); } + /** + * @param String + */ + public function setDisplayFolderName($name) { + $this->displayFolderName = $name; + return $this; + } + + /** + * @return String + */ + public function getDisplayFolderName() { + return $this->displayFolderName; + } /** * Process upload through UploadField,