4 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
5 include_once(
"./Modules/Cloud/exceptions/class.ilCloudException.php");
26 $response =
new stdClass();
27 $response->success = null;
28 $response->error = null;
29 $response->message = null;
34 $response->content = $this->form->getHTML();
35 $response->success =
true;
39 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
41 header(
'Content-type: application/json');
57 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
59 $this->form->setId(
"cld_create_folder");
63 $this->form->addItem($name);
67 $id->setValue(
$_POST[
"id"]);
68 $this->form->addItem($id);
71 $this->form->addCommandButton(
"createFolder",
$lng->txt(
"cld_create_folder"));
72 $this->form->addCommandButton(
"cancel",
$lng->txt(
"cancel"));
74 $this->form->setTitle(
$lng->txt(
"cld_create_folder"));
75 $this->form->setFormAction(
$ilCtrl->getFormAction($this));
76 $this->form->setTarget(
"cld_blank_target");
89 $response =
new stdClass();
90 $response->success = null;
91 $response->message = null;
92 $response->folder_id = null;
95 $response->status =
"done";
96 include_once(
"class.ilCloudFileTree.php");
98 $new_node = $file_tree->addFolderToService(
$_POST[
"parent_folder_id"],
$_POST[
"folder_name"]);
99 $response->folder_id = $new_node->getId();
100 $response->folder_path = $new_node->getPath();
101 $response->success =
true;
102 $response->message =
$tpl->getMessageHTML(
$lng->txt(
"cld_folder_created"),
"success");
105 $response->message =
$tpl->getMessageHTML($e->getMessage(),
"failure");
107 echo "<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(" .
ilJsonUtil::encode($response) .
");</script>";
117 $response =
new stdClass();
118 $response->status =
"cancel";
120 echo "<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(".ilJsonUtil::encode($response).
");</script>";
Class ilCloudPluginCreateFolderGUI.
static getFileTreeFromSession()
initCreateFolder()
Init form.
static encode($mixed, $suppress_native=false)
createFolder()
Update properties.
This class represents a text property in a property form.
Add a drawing to the header
cancel()
Update properties.