[BUGFIX] Filelist: fix file/folder pasteFileInto in file tree context menu 06/58606/3
authorJosef Glatz <josefglatz@gmail.com>
Wed, 10 Oct 2018 04:30:00 +0000 (05:30 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 11 Oct 2018 06:22:57 +0000 (08:22 +0200)
Provide missing data attributes for the context menu paste action.

Resolves: #86613
Releases: master
Change-Id: Ieafa22ca1456ac51cf217d30dbf1b762c9b6c923
Reviewed-on: https://review.typo3.org/58606
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Tested-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/filelist/Classes/ContextMenu/ItemProviders/FileProvider.php

index 019d13b..23b82c9 100644 (file)
@@ -364,11 +364,17 @@ class FileProvider extends \TYPO3\CMS\Backend\ContextMenu\ItemProviders\Abstract
                 $fileOrFolderInClipBoard->getName(),
                 $this->record->getName()
             );
+            $closeText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_mod_web_list.xlf:button.cancel');
+            $okLabel = $this->clipboard->currentMode() === 'copy' ? 'copy' : 'pasteinto';
+            $okText = $this->languageService->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:cm.' . $okLabel);
             $attributes += [
                 'data-title' => htmlspecialchars($title),
-                'data-message' => htmlspecialchars($confirmMessage)
+                'data-message' => htmlspecialchars($confirmMessage),
+                'data-button-close-text' => htmlspecialchars($closeText),
+                'data-button-ok-text' => htmlspecialchars($okText),
             ];
         }
+
         return $attributes;
     }