4 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
5 include_once(
"class.ilCloudUtil.php");
33 $this->cloud_object = $object;
43 $ilTabs->activateTab(
"settings");
49 $tpl->setContent($this->form->getHTML());
65 $this->form->addItem($ti);
69 $this->form->addItem($ta);
73 $this->form->addItem($cb);
75 $folder =
new ilTextInputGUI($lng->txt(
"cld_root_folder"),
"root_folder");
76 if(!$this->cloud_object->currentUserIsOwner())
79 $folder->setInfo($lng->txt(
"cld_only_owner_has_permission_to_change_root_path"));
82 $folder->setMaxLength(255);
84 $this->form->addItem($folder);
89 $this->form->addCommandButton(
"updateSettings", $lng->txt(
"save"));
91 $this->form->setTitle($lng->txt(
"cld_edit_Settings"));
92 $this->form->setFormAction($ilCtrl->getFormActionByClass(
"ilCloudPluginSettingsGUI"));
100 $section->setTitle($this->cloud_object->getServiceName().
" ".$lng->txt(
"cld_service_specific_settings"));
117 $values[
"title"] = $this->cloud_object->getTitle();
118 $values[
"desc"] = $this->cloud_object->getDescription();
119 $values[
"online"] = $this->cloud_object->getOnline();
120 $values[
"root_folder"] = $this->cloud_object->getRootFolder();
122 $this->form->setValuesByArray($values);
134 $ilTabs->activateTab(
"settings");
139 if ($this->form->checkInput())
141 $this->cloud_object->setTitle($this->form->getInput(
"title"));
142 $this->cloud_object->setDescription($this->form->getInput(
"desc"));
146 $this->cloud_object->setRootFolder($this->form->getInput(
"root_folder"));
147 $this->cloud_object->setRootId($this->
getService()->getRootId($this->cloud_object->getRootFolder()));
150 $this->cloud_object->setOnline($this->form->getInput(
"online"));
151 $this->cloud_object->update();
153 $ilCtrl->redirect($this,
'editSettings');
160 $this->form->setValuesByPost();
161 $tpl->setContent($this->form->getHtml());