3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
24 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
27 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
29 $this->lng->loadLanguageModule(
'mob');
30 $this->lng->loadLanguageModule(
'mep');
31 $this->lng->loadLanguageModule(
'content');
42 global $rbacsystem,
$ilErr,$ilAccess;
44 $next_class = $this->ctrl->getNextClass($this);
45 $cmd = $this->ctrl->getCmd();
49 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
51 $ilErr->raiseError($this->lng->txt(
'no_permission'),$ilErr->WARNING);
56 case 'ilpermissiongui':
57 $this->tabs_gui->setTabActive(
'perm_settings');
58 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
60 $ret = $this->ctrl->forwardCommand($perm_gui);
66 $cmd =
"editSettings";
83 global $rbacsystem, $ilAccess, $ilTabs;
85 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
87 $ilTabs->addTarget(
"settings",
88 $this->ctrl->getLinkTarget($this,
"editSettings"),
89 array(
"editSettings",
"view"));
92 if ($ilAccess->checkAccess(
'edit_permission',
"", $this->object->getRefId()))
94 $ilTabs->addTarget(
"perm_settings",
95 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
96 array(),
'ilpermissiongui');
112 $tpl->setContent($this->form->getHTML());
125 if ($this->form->checkInput())
129 $mset->set(
"mep_activate_pages",
$_POST[
"activate_pages"]);
130 $mset->set(
"file_manager_always",
$_POST[
"file_manager_always"]);
131 $mset->set(
"restricted_file_types",
$_POST[
"restricted_file_types"]);
132 $mset->set(
"black_list_file_types",
$_POST[
"black_list_file_types"]);
133 $mset->set(
"upload_dir",
$_POST[
"mob_upload_dir"]);
136 $ilCtrl->redirect($this,
"editSettings");
139 $this->form->setValuesByPost();
151 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
156 $cb->
setInfo($lng->txt(
"mobs_activate_pages_info"));
157 $this->form->addItem($cb);
160 $cb =
new ilCheckboxInputGUI($lng->txt(
"mobs_always_show_file_manager"),
"file_manager_always");
161 $cb->
setInfo($lng->txt(
"mobs_always_show_file_manager_info"));
162 $this->form->addItem($cb);
165 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"mobs_restrict_file_types"),
"restricted_file_types");
168 $ta->
setInfo($this->lng->txt(
"mobs_restrict_file_types_info"));
169 $this->form->addItem($ta);
172 $ta =
new ilTextAreaInputGUI($this->lng->txt(
"mobs_black_list_file_types"),
"black_list_file_types");
173 $ta->
setInfo($this->lng->txt(
"mobs_black_list_file_types_info"));
174 $this->form->addItem($ta);
179 $tx_prop->
setInfo($lng->txt(
"mob_upload_dir_info"));
180 $this->form->addItem($tx_prop);
182 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
184 $this->form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
187 $this->form->setTitle($lng->txt(
"settings"));
188 $this->form->setFormAction($ilCtrl->getFormAction($this));
199 $values[
"activate_pages"] = $mset->get(
"mep_activate_pages");
200 $values[
"file_manager_always"] = $mset->get(
"file_manager_always");
201 $values[
"restricted_file_types"] = $mset->get(
"restricted_file_types");
202 $values[
"black_list_file_types"] = $mset->get(
"black_list_file_types");
203 $values[
"mob_upload_dir"] = $mset->get(
"upload_dir");
205 $this->form->setValuesByArray($values);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
prepareOutput($a_show_subobjects=true)
prepare output
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
Create styles array
The data for the language used.
This class represents a text area property in a property form.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.