mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR Adjusted AssetAdmin->getEditForm() to comply with changed javascript - it returns the rendered form now
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92785 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9504fc1d57
commit
2fce8cf06e
@ -291,12 +291,7 @@ HTML;
|
|||||||
function getEditForm($id = null) {
|
function getEditForm($id = null) {
|
||||||
if(!$id) $id = $this->currentPageID();
|
if(!$id) $id = $this->currentPageID();
|
||||||
|
|
||||||
if($id && $id != "root") {
|
$record = ($id && $id != "root") ? DataObject::get_by_id("File", $id) : null;
|
||||||
$record = DataObject::get_by_id("File", $id);
|
|
||||||
} else {
|
|
||||||
$record = singleton("Folder");
|
|
||||||
}
|
|
||||||
|
|
||||||
if($record && !$record->canView()) return Security::permissionFailure($this);
|
if($record && !$record->canView()) return Security::permissionFailure($this);
|
||||||
|
|
||||||
if($record) {
|
if($record) {
|
||||||
@ -542,14 +537,13 @@ JS;
|
|||||||
}
|
}
|
||||||
|
|
||||||
$p->write();
|
$p->write();
|
||||||
|
|
||||||
mkdir($p->FullPath);
|
// Used in TinyMCE inline folder creation
|
||||||
chmod($p->FullPath, Filesystem::$file_create_mask);
|
|
||||||
|
|
||||||
if(isset($_REQUEST['returnID'])) {
|
if(isset($_REQUEST['returnID'])) {
|
||||||
return $p->ID;
|
return $p->ID;
|
||||||
} else {
|
} else {
|
||||||
return $this->returnItemToUser($p);
|
$form = $this->getEditForm($p->ID);
|
||||||
|
return $form->formHtmlContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user