3 include_once(
"./Services/Object/classes/class.ilObjectGUI.php");
23 public function __construct($a_data, $a_id, $a_call_by_reference =
true, $a_prepare_output =
true)
26 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
28 $this->lng->loadLanguageModule(
"prtf");
39 $next_class = $this->ctrl->getNextClass($this);
40 $cmd = $this->ctrl->getCmd();
46 case 'ilpermissiongui':
47 $this->tabs_gui->setTabActive(
'perm_settings');
48 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
50 $this->ctrl->forwardCommand($perm_gui);
56 $cmd =
"editSettings";
75 $this->tabs_gui->addTarget(
"settings",
76 $this->ctrl->getLinkTarget($this,
"editSettings"),
77 array(
"editSettings",
"view"));
82 $this->tabs_gui->addTarget(
"perm_settings",
83 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm"),
84 array(),
'ilpermissiongui');
96 $this->tabs_gui->setTabActive(
'settings');
113 $this->tpl->setContent($a_form->getHTML());
127 if($form->checkInput())
129 $ilSetting->set(
'user_portfolios', (
int)$form->getInput(
"prtf"));
131 $banner = (bool)$form->getInput(
"banner");
134 $prfa_set->set(
"pd_block", (
bool)$form->getInput(
"pd_block"));
135 $prfa_set->set(
"banner", $banner);
136 $prfa_set->set(
"banner_width", (
int)$form->getInput(
"width"));
137 $prfa_set->set(
"banner_height", (
int)$form->getInput(
"height"));
138 $prfa_set->set(
"mask", (
bool)$form->getInput(
"mask"));
139 $prfa_set->set(
"mycrs", (
bool)$form->getInput(
"mycrs"));
142 $ilCtrl->redirect($this,
"editSettings");
145 $form->setValuesByPost();
156 $ilCtrl->redirect($this,
"view");
168 include_once(
'Services/Form/classes/class.ilPropertyFormGUI.php');
170 $form->setFormAction($this->ctrl->getFormAction($this));
171 $form->setTitle($this->lng->txt(
'prtf_settings'));
173 if ($ilAccess->checkAccess(
"write",
"", $this->object->getRefId()))
175 $form->addCommandButton(
'saveSettings',$this->lng->txt(
'save'));
176 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
180 $lng->loadLanguageModule(
'pd');
181 $lng->loadLanguageModule(
'user');
184 $prtf_prop->setInfo($lng->txt(
'user_portfolios_desc'));
185 $prtf_prop->setChecked(($ilSetting->get(
'user_portfolios') ?
'1' :
'0'));
186 $form->addItem($prtf_prop);
191 $pdblock->
setInfo($lng->txt(
"prtf_pd_block_info"));
192 $pdblock->setChecked($prfa_set->get(
"pd_block",
false));
193 $form->addItem($pdblock);
196 $banner->
setInfo($lng->txt(
"prtf_preview_banner_info"));
197 $form->addItem($banner);
199 $width =
new ilNumberInputGUI($lng->txt(
"prtf_preview_banner_width"),
"width");
202 $banner->addSubItem($width);
204 $height =
new ilNumberInputGUI($lng->txt(
"prtf_preview_banner_height"),
"height");
207 $banner->addSubItem($height);
209 $banner->setChecked($prfa_set->get(
"banner",
false));
210 if($prfa_set->get(
"banner"))
212 $width->setValue($prfa_set->get(
"banner_width"));
213 $height->setValue($prfa_set->get(
"banner_height"));
217 $width->setValue(1370);
218 $height->setValue(100);
222 $mask->setInfo($lng->txt(
"prtf_allow_html_info"));
223 $mask->setChecked($prfa_set->get(
"mask",
false));
224 $form->addItem(
$mask);
227 $mycourses->
setInfo($lng->txt(
"prtf_allow_my_courses_info"));
228 $mycourses->setChecked($prfa_set->get(
"mycrs",
true));
229 $form->addItem($mycourses);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
editSettings($a_form=null)
Edit settings.
initFormSettings()
Init settings property form.
Portfolio Administration Settings.
__construct($a_data, $a_id, $a_call_by_reference=true, $a_prepare_output=true)
Contructor.
prepareOutput($a_show_subobjects=true)
prepare output
executeCommand()
Execute command.
Class ilObjectGUI Basic methods of all Output classes.
Create styles array
The data for the language used.
addToExternalSettingsForm($a_form_id)
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.
saveSettings()
Save settings.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.