4 include_once(
"./Services/JSON/classes/class.ilJsonUtil.php");
5 include_once(
"./Modules/Cloud/exceptions/class.ilCloudException.php");
25 $response =
new stdClass();
26 $response->success = null;
27 $response->error = null;
28 $response->message = null;
33 $response->content = $this->form->getHTML();
34 $response->success =
true;
38 $response->message = $tpl->getMessageHTML($e->getMessage(),
"failure");
40 header(
'Content-type: application/json');
54 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
56 $this->form->setId(
"cld_create_folder");
58 $name =
new ilTextInputGUI($lng->txt(
"cld_folder_name"),
"folder_name");
60 $this->form->addItem($name);
64 $id->setValue(
$_POST[
"id"]);
65 $this->form->addItem($id);
68 $this->form->addCommandButton(
"createFolder", $lng->txt(
"cld_create_folder"));
69 $this->form->addCommandButton(
"cancel", $lng->txt(
"cancel"));
71 $this->form->setTitle($lng->txt(
"cld_create_folder"));
72 $this->form->setFormAction($ilCtrl->getFormAction($this));
73 $this->form->setTarget(
"cld_blank_target");
84 $response =
new stdClass();
85 $response->success = null;
86 $response->message = null;
87 $response->folder_id = null;
90 $response->status =
"done";
91 include_once(
"class.ilCloudFileTree.php");
93 $new_node = $file_tree->addFolderToService(
$_POST[
"parent_folder_id"],
$_POST[
"folder_name"]);
94 $response->folder_id = $new_node->getId();
95 $response->folder_path = $new_node->getPath();
96 $response->success =
true;
97 $response->message = $tpl->getMessageHTML($lng->txt(
"cld_folder_created"),
"success");
100 $response->message = $tpl->getMessageHTML($e->getMessage(),
"failure");
102 echo
"<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(" .
ilJsonUtil::encode($response) .
");</script>";
112 $response =
new stdClass();
113 $response->status =
"cancel";
115 echo
"<script language='javascript' type='text/javascript'>window.parent.il.CloudFileList.afterCreateFolder(".ilJsonUtil::encode($response).
");</script>";