mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge pull request #1990 from jason-zz/patch-1
BUG UploadField overwriteWarning isn't working in AssetAdmin
This commit is contained in:
commit
0f2ff54557
@ -103,6 +103,11 @@ class CMSFileAddController extends LeftAndMain {
|
||||
);
|
||||
$form->loadDataFrom($folder);
|
||||
|
||||
if($this->currentPageID()){
|
||||
// Make sure this controller know current folder when AJAX 'fileexists' is fired.
|
||||
$uploadField->setConfig('urlFileExists', Controller::join_links($uploadField->link('fileexists'), '?ID=' . $this->currentPageID()));
|
||||
}
|
||||
|
||||
$this->extend('updateEditForm', $form);
|
||||
|
||||
return $form;
|
||||
|
Loading…
Reference in New Issue
Block a user