mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Only set folder field state in AssetAdmin if a folder is shown
This commit is contained in:
parent
a64cf8c27b
commit
3c81958345
@ -135,7 +135,7 @@ JS
|
|||||||
$folder = ($id && is_numeric($id)) ? DataObject::get_by_id('Folder', $id, false) : $this->currentPage();
|
$folder = ($id && is_numeric($id)) ? DataObject::get_by_id('Folder', $id, false) : $this->currentPage();
|
||||||
$fields = $form->Fields();
|
$fields = $form->Fields();
|
||||||
$title = ($folder && $folder->exists()) ? $folder->Title : _t('AssetAdmin.FILES', 'Files');
|
$title = ($folder && $folder->exists()) ? $folder->Title : _t('AssetAdmin.FILES', 'Files');
|
||||||
$fields->push(new HiddenField('ID', false, $folder->ID));
|
$fields->push(new HiddenField('ID', false, $folder ? $folder->ID : null));
|
||||||
|
|
||||||
// File listing
|
// File listing
|
||||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||||
|
Loading…
Reference in New Issue
Block a user