当前位置: 首页>>代码示例>>PHP>>正文


PHP ilPropertyFormGUI::getHTML方法代码示例

本文整理汇总了PHP中ilPropertyFormGUI::getHTML方法的典型用法代码示例。如果您正苦于以下问题:PHP ilPropertyFormGUI::getHTML方法的具体用法?PHP ilPropertyFormGUI::getHTML怎么用?PHP ilPropertyFormGUI::getHTML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilPropertyFormGUI的用法示例。


在下文中一共展示了ilPropertyFormGUI::getHTML方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: configure

 /**
  * Configure screen
  */
 function configure()
 {
     global $tpl;
     $this->initConfigurationForm();
     $this->getValues();
     $tpl->setContent($this->form->getHTML());
 }
开发者ID:studer-raimann,项目名称:ContainerFilter,代码行数:10,代码来源:class.ilContainerFilterConfigGUI.php

示例2: editProperties

 public function editProperties()
 {
     $this->tabs->activateTab('properties');
     $this->initPropertiesForm();
     $this->getPropertiesValues();
     $this->tpl->setContent($this->form->getHTML());
 }
开发者ID:studer-raimann,项目名称:Edupad,代码行数:7,代码来源:class.ilObjEdupadGUI.php

示例3: showDetails

 /**
  * @param ilObjBibliographic $bibl_obj
  * @return void
  *
  */
 public function showDetails(ilObjBibliographic $bibl_obj)
 {
     global $tpl, $ilTabs, $ilCtrl, $lng;
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $ilTabs->clearTargets();
     $ilTabs->setBackTarget("back", $ilCtrl->getLinkTarget($this, 'showContent'));
     $form->setTitle($lng->txt('detail_view'));
     $entry = new ilBibliographicEntry($bibl_obj->getFiletype(), $_GET['entryId']);
     $attributes = $entry->getAttributes();
     //translate array key in order to sort by those keys
     foreach ($attributes as $key => $attribute) {
         //Check if there is a specific language entry
         if ($lng->exists($key)) {
             $strDescTranslated = $lng->txt($key);
         } else {
             $arrKey = explode("_", $key);
             $strDescTranslated = $lng->txt($arrKey[0] . "_default_" . $arrKey[2]);
         }
         unset($attributes[$key]);
         $attributes[$strDescTranslated] = $attribute;
     }
     // sort attributes alphabetically by their array-key
     ksort($attributes, SORT_STRING);
     // render attributes to html
     foreach ($attributes as $key => $attribute) {
         $ci = new ilCustomInputGUI($key);
         $ci->setHtml($attribute);
         $form->addItem($ci);
     }
     // set content and title
     $tpl->setContent($form->getHTML());
     //Permanent Link
     $tpl->setPermanentLink("bibl", $bibl_obj->getRefId(), "_" . $_GET['entryId']);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:40,代码来源:class.ilBibliographicDetailsGUI.php

示例4: asyncUploadFile

 function asyncUploadFile()
 {
     global $ilTabs;
     $ilTabs->activateTab("content");
     $this->initUploadForm();
     echo $this->form->getHTML();
     $options = new stdClass();
     $options->dropZone = "#ilFileUploadDropZone_1";
     $options->fileInput = "#ilFileUploadInput_1";
     $options->submitButton = "uploadFiles";
     $options->cancelButton = "cancelAll";
     $options->dropArea = "#ilFileUploadDropArea_1";
     $options->fileList = "#ilFileUploadList_1";
     $options->fileSelectButton = "#ilFileUploadFileSelect_1";
     echo "<script language='javascript' type='text/javascript'>var fileUpload1 = new ilFileUpload(1, " . ilJsonUtil::encode($options) . ");</script>";
     $_SESSION["cld_folder_id"] = $_POST["folder_id"];
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:18,代码来源:class.ilCloudPluginUploadGUI.php

示例5: configure

 /**
  * Configuration gui.
  */
 function configure()
 {
     global $tpl;
     $pl = $this->getPluginObject();
     $form = new ilPropertyFormGUI();
     $form->setTitle($pl->txt('roomsharing_plugin_configuration'));
     $form->setDescription($pl->txt('roomsharing_plugin_config_not_required'));
     $tpl->setContent($form->getHTML());
 }
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:12,代码来源:class.ilRoomSharingConfigGUI.php

示例6: save

 /**
  * save Field
  *
  * @param string $a_mode values: create | update
  */
 public function save($a_mode = "create")
 {
     global $ilCtrl, $lng, $tpl;
     //check access
     if (!$this->table->hasPermissionToFields($this->parent_obj->ref_id)) {
         $this->accessDenied();
         return;
     }
     $this->initForm($a_mode == "update" ? "edit" : "create");
     if ($this->checkInput($a_mode)) {
         $title = $this->form->getInput("title");
         if ($a_mode != "create" && $title != $this->field_obj->getTitle()) {
             ilUtil::sendInfo($lng->txt("dcl_field_title_change_warning"), true);
         }
         $this->field_obj->setTitle($title);
         $this->field_obj->setDescription($this->form->getInput("description"));
         $this->field_obj->setDatatypeId($this->form->getInput("datatype"));
         $this->field_obj->setRequired($this->form->getInput("required"));
         $this->field_obj->setUnique($this->form->getInput("unique"));
         if ($a_mode == "update") {
             $this->field_obj->doUpdate();
         } else {
             $this->field_obj->setVisible(true);
             $this->field_obj->setOrder($this->table->getNewOrder());
             $this->field_obj->doCreate();
         }
         // Get possible properties and save them
         include_once "./Modules/DataCollection/classes/class.ilDataCollectionFieldProp.php";
         foreach (ilDataCollectionDatatype::getProperties($this->field_obj->getDatatypeId()) as $property) {
             $fieldprop_obj = new ilDataCollectionFieldProp();
             $fieldprop_obj->setDatatypePropertyId($property['id']);
             $fieldprop_obj->setFieldId($this->field_obj->getId());
             $fieldprop_obj->setValue($this->form->getInput("prop_" . $property['id']));
             if ($a_mode == "update") {
                 $fieldprop_obj->doUpdate();
             } else {
                 $fieldprop_obj->doCreate();
             }
         }
         $ilCtrl->setParameter($this, "field_id", $this->field_obj->getId());
         if ($a_mode == "update") {
             ilUtil::sendSuccess($lng->txt("dcl_msg_field_modified"), true);
         } else {
             $this->table->addField($this->field_obj);
             $this->table->buildOrderFields();
             ilUtil::sendSuccess($lng->txt("msg_field_created"), false);
         }
         $ilCtrl->redirectByClass(strtolower("ilDataCollectionFieldListGUI"), "listFields");
     } else {
         $this->form->setValuesByPost();
         $tpl->setContent($this->form->getHTML());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:58,代码来源:class.ilDataCollectionFieldEditGUI.php

示例7: sendFailure

 /**
  * @param $message
  */
 protected function sendFailure($message)
 {
     $keep = $this->ctrl->isAsynch() ? false : true;
     $this->form->setValuesByPost();
     if ($this->ctrl->isAsynch()) {
         echo $this->tpl->getMessageHTML($message, 'failure') . $this->form->getHTML();
         exit;
     } else {
         ilUtil::sendFailure($message, $keep);
         $this->tpl->setContent($this->form->getHTML());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilDataCollectionRecordEditGUI.php

示例8: showMembersObject

 public function showMembersObject()
 {
     /**
      * @var $tree ilTree
      * @var $tpl ilTemplate
      * @var $ilTabs ilTabsGUI
      * @var $ilAccess ilAccessHandler
      * @var $ilErr		ilErr
      */
     global $tree, $tpl, $ilTabs, $ilAccess, $ilErr;
     if (!$ilAccess->checkAccess('write', '', $this->ref_id)) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     $tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.forums_members_list.html', 'Modules/Forum');
     $ilTabs->setTabActive('settings');
     $this->settingsTabs();
     // instantiate the property form
     if (!$this->initNotificationSettingsForm()) {
         // if the form was just created set the values fetched from database
         $this->notificationSettingsForm->setValuesByArray(array('notification_type' => $this->objProperties->getNotificationType(), 'adm_force' => (bool) $this->objProperties->isAdminForceNoti(), 'usr_toggle' => (bool) $this->objProperties->isUserToggleNoti()));
     }
     // set form html into template
     $tpl->setVariable('NOTIFICATIONS_SETTINGS_FORM', $this->notificationSettingsForm->getHTML());
     include_once 'Modules/Forum/classes/class.ilForumNotification.php';
     include_once 'Modules/Forum/classes/class.ilObjForum.php';
     $frm_noti = new ilForumNotification($this->object->getRefId());
     $oParticipants = $this->getParticipantsObject();
     $moderator_ids = $frm_noti->_getModerators($this->object->getRefId());
     $admin_ids = $oParticipants->getAdmins();
     $member_ids = $oParticipants->getMembers();
     $tutor_ids = $oParticipants->getTutors();
     if ($this->objProperties->getNotificationType() == 'default') {
         // update forum_notification table
         include_once 'Modules/Forum/classes/class.ilForumNotification.php';
         $forum_noti = new ilForumNotification($this->object->getRefId());
         $forum_noti->setAdminForce($this->objProperties->isAdminForceNoti());
         $forum_noti->setUserToggle($this->objProperties->isUserToggleNoti());
         $forum_noti->setForumId($this->objProperties->getObjId());
     } else {
         if ($this->objProperties->getNotificationType() == 'per_user') {
             $moderators = $this->getUserNotificationTableData($moderator_ids, $frm_noti);
             $admins = $this->getUserNotificationTableData($admin_ids, $frm_noti);
             $members = $this->getUserNotificationTableData($member_ids, $frm_noti);
             $tutors = $this->getUserNotificationTableData($tutor_ids, $frm_noti);
             $this->__showMembersTable($moderators, $admins, $members, $tutors);
         }
     }
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:48,代码来源:class.ilObjForumGUI.php

示例9: owner

 function owner()
 {
     $this->__initSubTabs("owner");
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, "owner"));
     $form->setTitle($this->lng->txt("info_owner_of_object"));
     $login = new ilTextInputGUI($this->lng->txt("login"), "owner");
     $login->setDataSource($this->ctrl->getLinkTargetByClass(array(get_class($this), 'ilRepositorySearchGUI'), 'doUserAutoComplete', '', true));
     $login->setRequired(true);
     $login->setSize(50);
     $login->setInfo($this->lng->txt("chown_warning"));
     $login->setValue(ilObjUser::_lookupLogin($this->gui_obj->object->getOwner()));
     $form->addItem($login);
     $form->addCommandButton("changeOwner", $this->lng->txt("change_owner"));
     $this->tpl->setContent($form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:17,代码来源:class.ilPermission2GUI.php

示例10: showTopicForm

 public function showTopicForm()
 {
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     if ($this->objCurrentTopic->getId()) {
         $this->ctrl->setParameter($this, 'topic_id', $this->objCurrentTopic->getId());
     }
     $form->setFormAction($this->ctrl->getFormAction($this, 'saveTopic'));
     $form->setTitle($this->lng->txt($this->objCurrentTopic->getId() ? 'edit_topic' : 'new_topic'));
     $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $title->setValue($this->objCurrentTopic->getTitle());
     $title->setRequired(true);
     $form->addItem($title);
     $sorting = new ilTextInputGUI($this->lng->txt('pay_sorting_value'), 'sorting');
     $sorting->setValue($this->objCurrentTopic->getSorting());
     $sorting->setMaxLength(11);
     $sorting->setSize(11);
     $form->addItem($sorting);
     $form->addCommandButton('saveTopic', $this->lng->txt('save'));
     $form->addCommandButton('showTopicsList', $this->lng->txt('cancel'));
     $this->tpl->setVariable('FORM', $form->getHTML());
     return true;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:24,代码来源:class.ilShopTopicsGUI.php

示例11: renameFileForm

 /**
  * list files
  */
 function renameFileForm()
 {
     global $lng, $ilCtrl;
     if (!isset($_POST["file"])) {
         $this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
     }
     if (count($_POST["file"]) > 1) {
         $this->ilias->raiseError($this->lng->txt("cont_select_max_one_item"), $this->ilias->error_obj->MESSAGE);
     }
     if (ilUtil::stripSlashes($_POST["file"][0]) == "..") {
         $this->ilias->raiseError($this->lng->txt("select_a_file"), $this->ilias->error_obj->MESSAGE);
     }
     $cur_subdir = str_replace(".", "", ilUtil::stripSlashes($_GET["cdir"]));
     $file = !empty($cur_subdir) ? $this->main_dir . "/" . $cur_subdir . "/" . ilUtil::stripSlashes($_POST["file"][0]) : $this->main_dir . "/" . ilUtil::stripSlashes($_POST["file"][0]);
     $this->ctrl->setParameter($this, "old_name", ilUtil::stripSlashes($_POST["file"][0]));
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     // file/dir name
     $ti = new ilTextInputGUI($this->lng->txt("name"), "new_name");
     $ti->setMaxLength(200);
     $ti->setSize(40);
     $ti->setValue(ilUtil::stripSlashes($_POST["file"][0]));
     $form->addItem($ti);
     // save and cancel commands
     $form->addCommandButton("renameFile", $lng->txt("rename"));
     $form->addCommandButton("cancelRename", $lng->txt("cancel"));
     $form->setFormAction($ilCtrl->getFormAction($this, "renameFile"));
     if (@is_dir($file)) {
         $form->setTitle($this->lng->txt("cont_rename_dir"));
     } else {
         $form->setTitle($this->lng->txt("rename_file"));
     }
     $this->tpl->setContent($form->getHTML());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:37,代码来源:class.ilFileSystemGUI.php

示例12: editSOAPObject


//.........这里部分代码省略.........
     //set uri
     $uri = new ilTextInputGUI();
     $uri->setTitle($this->lng->txt("uri"));
     $uri->setInfo($this->lng->txt("auth_soap_uri_desc"));
     $uri->setPostVar("soap[uri]");
     $uri->setSize(50);
     $uri->setMaxLength(256);
     //set namespace
     $namespace = new ilTextInputGUI();
     $namespace->setTitle($this->lng->txt("auth_soap_namespace"));
     $namespace->setInfo($this->lng->txt("auth_soap_namespace_desc"));
     $namespace->setPostVar("soap[namespace]");
     $namespace->setSize(50);
     $namespace->setMaxLength(256);
     //set dotnet
     $dotnet = new ilCheckboxInputGUI();
     $dotnet->setTitle($this->lng->txt("auth_soap_use_dotnet"));
     $dotnet->setPostVar("soap[use_dotnet]");
     //set create users
     $createuser = new ilCheckboxInputGUI();
     $createuser->setTitle($this->lng->txt("auth_create_users"));
     $createuser->setInfo($this->lng->txt("auth_soap_create_users_desc"));
     $createuser->setPostVar("soap[create_users]");
     //set account mail
     $sendmail = new ilCheckboxInputGUI();
     $sendmail->setTitle($this->lng->txt("user_send_new_account_mail"));
     $sendmail->setInfo($this->lng->txt("auth_new_account_mail_desc"));
     $sendmail->setPostVar("soap[account_mail]");
     //set user default role
     $defaultrole = new ilSelectInputGUI();
     $defaultrole->setTitle($this->lng->txt("auth_user_default_role"));
     $defaultrole->setInfo($this->lng->txt("auth_soap_user_default_role_desc"));
     $defaultrole->setPostVar("soap[user_default_role]");
     $defaultrole->setOptions($roles);
     //set allow local authentication
     $allowlocal = new ilCheckboxInputGUI();
     $allowlocal->setTitle($this->lng->txt("auth_allow_local"));
     $allowlocal->setInfo($this->lng->txt("auth_soap_allow_local_desc"));
     $allowlocal->setPostVar("soap[allow_local]");
     // get all settings
     $settings = $ilSetting->getAll();
     // get values in error case
     if ($_SESSION["error_post_vars"]) {
         $active->setChecked($_SESSION["error_post_vars"]["soap"]["active"]);
         $server->setValue($_SESSION["error_post_vars"]["soap"]["server"]);
         $port->setValue($_SESSION["error_post_vars"]["soap"]["port"]);
         $https->setChecked($_SESSION["error_post_vars"]["soap"]["use_https"]);
         $uri->setValue($_SESSION["error_post_vars"]["soap"]["uri"]);
         $namespace->setValue($_SESSION["error_post_vars"]["soap"]["namespace"]);
         $dotnet->setChecked($_SESSION["error_post_vars"]["soap"]["use_dotnet"]);
         $createuser->setChecked($_SESSION["error_post_vars"]["soap"]["create_users"]);
         $allowlocal->setChecked($_SESSION["error_post_vars"]["soap"]["allow_local"]);
         $defaultrole->setValue($_SESSION["error_post_vars"]["soap"]["user_default_role"]);
         $sendmail->setChecked($_SESSION["error_post_vars"]["soap"]["account_mail"]);
     } else {
         $active->setChecked($settings["soap_auth_active"]);
         $server->setValue($settings["soap_auth_server"]);
         $port->setValue($settings["soap_auth_port"]);
         $https->setChecked($settings["soap_auth_use_https"]);
         $uri->setValue($settings["soap_auth_uri"]);
         $namespace->setValue($settings["soap_auth_namespace"]);
         $dotnet->setChecked($settings["soap_auth_use_dotnet"]);
         $createuser->setChecked($settings["soap_auth_create_users"]);
         $allowlocal->setChecked($settings["soap_auth_allow_local"]);
         $defaultrole->setValue($settings["soap_auth_user_default_role"]);
         $sendmail->setChecked($settings["soap_auth_account_mail"]);
     }
     if (!$defaultrole->getValue()) {
         $defaultrole->setValue(4);
     }
     //add Items to property gui
     $soap_config->addItem($active);
     $soap_config->addItem($server);
     $soap_config->addItem($port);
     $soap_config->addItem($https);
     $soap_config->addItem($uri);
     $soap_config->addItem($namespace);
     $soap_config->addItem($dotnet);
     $soap_config->addItem($createuser);
     $soap_config->addItem($sendmail);
     $soap_config->addItem($defaultrole);
     $soap_config->addItem($allowlocal);
     $this->tpl->setVariable("CONFIG_FORM", $soap_config->getHTML());
     // test form
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitle("Test Request");
     $text_prop = new ilTextInputGUI("ext_uid", "ext_uid");
     $form->addItem($text_prop);
     $text_prop2 = new ilTextInputGUI("soap_pw", "soap_pw");
     $form->addItem($text_prop2);
     $cb = new ilCheckboxInputGUI("new_user", "new_user");
     $form->addItem($cb);
     $form->addCommandButton("testSoapAuthConnection", "Send");
     if ($ilCtrl->getCmd() == "testSoapAuthConnection") {
         include_once "./Services/SOAPAuth/classes/class.ilSOAPAuth.php";
         $ret = "<br />" . ilSOAPAuth::testConnection(ilUtil::stripSlashes($_POST["ext_uid"]), ilUtil::stripSlashes($_POST["soap_pw"]), (bool) $_POST["new_user"]);
     }
     $this->tpl->setVariable("TEST_FORM", $form->getHTML() . $ret);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjAuthSettingsGUI.php

示例13: suggestedsolution


//.........这里部分代码省略.........
                 if (!file_exists($this->object->getSuggestedSolutionPath())) {
                     ilUtil::makeDirParents($this->object->getSuggestedSolutionPath());
                 }
                 $res = ilUtil::moveUploadedFile($_FILES["file"]["tmp_name"], $_FILES["file"]["name"], $this->object->getSuggestedSolutionPath() . $_FILES["file"]["name"]);
                 if ($res) {
                     ilUtil::renameExecutables($this->object->getSuggestedSolutionPath());
                     // remove an old file download
                     if (is_array($solution_array["value"])) {
                         @unlink($this->object->getSuggestedSolutionPath() . $solution_array["value"]["name"]);
                     }
                     $file->setValue($_FILES["file"]["name"]);
                     $this->object->saveSuggestedSolution("file", "", 0, array("name" => $_FILES["file"]["name"], "type" => $_FILES["file"]["type"], "size" => $_FILES["file"]["size"], "filename" => $_POST["filename"]));
                     $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
                     if (($_GET["calling_test"] || isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
                         return $this->originalSyncForm("suggestedsolution");
                     } else {
                         ilUtil::sendSuccess($this->lng->txt("suggested_solution_added_successfully"), TRUE);
                         $this->ctrl->redirect($this, "suggestedsolution");
                     }
                 } else {
                     // BH: $res as info string? wtf? it holds a bool or something else!!?
                     ilUtil::sendInfo($res);
                 }
             } else {
                 if (is_array($solution_array["value"])) {
                     $file->setValue($solution_array["value"]["name"]);
                     $file->setFilename(strlen($solution_array["value"]["filename"]) ? $solution_array["value"]["filename"] : $solution_array["value"]["name"]);
                 }
             }
             $form->addItem($file);
             $hidden = new ilHiddenInputGUI("solutiontype");
             $hidden->setValue("file");
             $form->addItem($hidden);
         } else {
             if (strcmp($solution_array["type"], "text") == 0) {
                 $question = new ilTextAreaInputGUI($this->lng->txt("solutionText"), "solutiontext");
                 $question->setValue($this->object->prepareTextareaOutput($solution_array["value"]));
                 $question->setRequired(TRUE);
                 $question->setRows(10);
                 $question->setCols(80);
                 $question->setUseRte(TRUE);
                 $question->addPlugin("latex");
                 $question->addButton("latex");
                 $question->setRTESupport($this->object->getId(), "qpl", "assessment");
                 $hidden = new ilHiddenInputGUI("solutiontype");
                 $hidden->setValue("text");
                 $form->addItem($hidden);
                 $form->addItem($question);
             }
         }
         if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
             $form->addCommandButton("suggestedsolution", $this->lng->txt("save"));
         }
         if ($save) {
             if ($form->checkInput()) {
                 switch ($solution_array["type"]) {
                     case "file":
                         $this->object->saveSuggestedSolution("file", "", 0, array("name" => $solution_array["value"]["name"], "type" => $solution_array["value"]["type"], "size" => $solution_array["value"]["size"], "filename" => $_POST["filename"]));
                         break;
                     case "text":
                         $this->object->saveSuggestedSolution("text", "", 0, $solution_array["value"]);
                         break;
                 }
                 $originalexists = $this->object->_questionExistsInPool($this->object->original_id);
                 if (($_GET["calling_test"] || isset($_GET['calling_consumer']) && (int) $_GET['calling_consumer']) && $originalexists && assQuestion::_isWriteable($this->object->original_id, $ilUser->getId())) {
                     return $this->originalSyncForm("suggestedsolution");
                 } else {
                     ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
                     $this->ctrl->redirect($this, "suggestedsolution");
                 }
             }
         }
         $output = $form->getHTML();
     }
     $savechange = strcmp($this->ctrl->getCmd(), "saveSuggestedSolution") == 0 ? TRUE : FALSE;
     $changeoutput = "";
     if ($ilAccess->checkAccess("write", "", $_GET['ref_id'])) {
         $formchange = new ilPropertyFormGUI();
         $formchange->setFormAction($this->ctrl->getFormAction($this));
         $formchange->setTitle(count($solution_array) ? $this->lng->txt("changeSuggestedSolution") : $this->lng->txt("addSuggestedSolution"));
         $formchange->setMultipart(FALSE);
         $formchange->setTableWidth("100%");
         $formchange->setId("suggestedsolution");
         $solutiontype = new ilRadioGroupInputGUI($this->lng->txt("suggestedSolutionType"), "solutiontype");
         foreach ($options as $opt_value => $opt_caption) {
             $solutiontype->addOption(new ilRadioOption($opt_caption, $opt_value));
         }
         if (count($solution_array)) {
             $solutiontype->setValue($solution_array["type"]);
         }
         $solutiontype->setRequired(TRUE);
         $formchange->addItem($solutiontype);
         $formchange->addCommandButton("saveSuggestedSolution", $this->lng->txt("select"));
         if ($savechange) {
             $formchange->checkInput();
         }
         $changeoutput = $formchange->getHTML();
     }
     $this->tpl->setVariable("ADM_CONTENT", $changeoutput . $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.assQuestionGUI.php

示例14: editDiskQuotaSettings

 /**
  * Edit disk quota settings.
  */
 public function editDiskQuotaSettings()
 {
     global $rbacsystem, $ilErr, $ilSetting, $tpl, $lng, $ilCtrl;
     if (!$rbacsystem->checkAccess("visible,read", $this->object->getRefId())) {
         $ilErr->raiseError($lng->txt("no_permission"), $ilErr->WARNING);
     }
     $this->tabs_gui->setTabActive('disk_quota');
     $this->addDiskQuotaSubtabs('settings');
     require_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     require_once "./Services/Form/classes/class.ilCheckboxInputGUI.php";
     require_once "./Services/Form/classes/class.ilRadioGroupInputGUI.php";
     require_once "./Services/Form/classes/class.ilRadioOption.php";
     require_once "./Services/Form/classes/class.ilTextAreaInputGUI.php";
     require_once "./Services/WebDAV/classes/class.ilDAVServer.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitle($lng->txt("settings"));
     // Enable disk quota
     $cb_prop = new ilCheckboxInputGUI($lng->txt("enable_disk_quota"), "enable_disk_quota");
     $cb_prop->setValue('1');
     $cb_prop->setChecked($this->disk_quota_obj->isDiskQuotaEnabled());
     $cb_prop->setInfo($lng->txt('enable_disk_quota_info'));
     $form->addItem($cb_prop);
     // Enable disk quota reminder mail
     $cb_prop_reminder = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_reminder_mail"), "enable_disk_quota_reminder_mail");
     $cb_prop_reminder->setValue('1');
     $cb_prop_reminder->setChecked($this->disk_quota_obj->isDiskQuotaReminderMailEnabled());
     $cb_prop_reminder->setInfo($lng->txt('disk_quota_reminder_mail_desc'));
     $cb_prop->addSubItem($cb_prop_reminder);
     // Enable summary mail for certain users
     $cb_prop_summary = new ilCheckboxInputGUI($lng->txt("enable_disk_quota_summary_mail"), "enable_disk_quota_summary_mail");
     $cb_prop_summary->setValue(1);
     $cb_prop_summary->setChecked($this->disk_quota_obj->isDiskQuotaSummaryMailEnabled());
     $cb_prop_summary->setInfo($lng->txt('enable_disk_quota_summary_mail_desc'));
     $cb_prop->addSubItem($cb_prop_summary);
     // Edit disk quota recipients
     $summary_rcpt = new ilTextInputGUI($lng->txt("disk_quota_summary_rctp"), "disk_quota_summary_rctp");
     $summary_rcpt->setValue($this->disk_quota_obj->getSummaryRecipients());
     $summary_rcpt->setInfo($lng->txt('disk_quota_summary_rctp_desc'));
     $cb_prop_summary->addSubItem($summary_rcpt);
     // command buttons
     $form->addCommandButton('saveDiskQuotaSettings', $lng->txt('save'));
     $form->addCommandButton('editDiskQuotaSettings', $lng->txt('cancel'));
     $tpl->setContent($form->getHTML());
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:48,代码来源:class.ilObjFileAccessSettingsGUI.php

示例15: showDetails


//.........这里部分代码省略.........
     $this->__initPricesObject();
     $this->__initShoppingCartObject();
     $ilToolbar->addButton($this->lng->txt('payment_back_to_shop'), 'ilias.php?baseClass=ilShopController');
     $this->tpl->getStandardTemplate();
     $ilTabs->setTabActive('buy');
     $ilMainMenu->setActive('shop');
     if ($this->pobject->getStatus() == $this->pobject->STATUS_EXPIRES) {
         ilUtil::sendInfo($this->lng->txt('pay_expires_info'));
         return false;
     }
     $extension_prices = array();
     if ($ilUser->getId() != ANONYMOUS_USER_ID) {
         include_once './Services/Payment/classes/class.ilPaymentBookings.php';
         $has_extension_price = ilPaymentBookings::_hasAccesstoExtensionPrice($ilUser->getId(), $this->pobject->getPobjectId());
         if ($has_extension_price) {
             $extension_prices = $this->price_obj->getExtensionPrices();
         }
     }
     $org_prices = $this->price_obj->getPrices();
     $tmp_prices = array_merge($org_prices, $extension_prices);
     $prices = array();
     foreach ($tmp_prices as $price) {
         // expired prices must be filtered out
         if ($price['price_type'] == ilPaymentPrices::TYPE_DURATION_DATE && $price['duration_until'] < date('Y-m-d')) {
             //do nothing
         } else {
             $prices[] = $price;
         }
     }
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this));
     $buyedObject = "";
     if ($this->sc_obj->isInShoppingCart($this->pobject->getPobjectId())) {
         $buyedObject = $this->sc_obj->getEntry($this->pobject->getPobjectId());
         if (is_array($prices) && count($prices) > 1) {
             ilUtil::sendInfo($this->lng->txt('pay_item_already_in_sc_choose_another'));
         } else {
             ilUtil::sendInfo($this->lng->txt('pay_item_already_in_sc'));
         }
     }
     $this->ctrl->setParameter($this, "ref_id", $this->pobject->getRefId());
     $subtype = '';
     if ($this->object) {
         if ($this->object->getType() == 'exc') {
             $subtype = ' (' . $this->lng->txt($this->pobject->getSubtype()) . ')';
         }
         $form->setTitle($this->object->getTitle() . ' ' . $subtype);
         $form->setTitleIcon(ilObject::_getIcon($this->object->getId()));
     } else {
         ilUtil::sendFailure($this->lng->txt('object_not_found'));
     }
     // payment infos
     $info = new ilNonEditableValueGUI($this->lng->txt('info'));
     $info->setValue($this->lng->txt('pay_info'));
     $form->addItem($info);
     if (is_array($buyedObject)) {
         if (is_array($prices) && count($prices) > 1) {
             $button_txt = $this->lng->txt('pay_change_price');
         } else {
             $button_txt = $this->lng->txt('pay_add_to_shopping_cart');
         }
     } else {
         $button_txt = $this->lng->txt('pay_add_to_shopping_cart');
     }
     $rg_prices = new ilRadioGroupInputGUI($this->lng->txt('prices'), 'price_id');
     if (is_array($prices)) {
         foreach ($prices as $price) {
             if (is_array($buyedObject) && $buyedObject["price_id"] == $price['price_id']) {
                 $rg_prices->setValue($price['price_id']);
             } else {
                 if (count($prices) == 1) {
                     $rg_prices->setValue($price['price_id']);
                 }
             }
             switch ($price['price_type']) {
                 case ilPaymentPrices::TYPE_DURATION_MONTH:
                     $txt_price = $price['duration'] . ' ' . $this->lng->txt('paya_months') . ': ';
                     break;
                 case ilPaymentPrices::TYPE_DURATION_DATE:
                     $txt_price = ilDatePresentation::formatDate(new ilDate($price['duration_from'], IL_CAL_DATE)) . ' - ' . ilDatePresentation::formatDate(new ilDate($price['duration_until'], IL_CAL_DATE)) . ':  ';
                     break;
                 case ilPaymentPrices::TYPE_UNLIMITED_DURATION:
                     $txt_price = $this->lng->txt('unlimited_duration') . ': ';
                     break;
             }
             $tmp_price = $price['price'];
             $extension_txt = '';
             if ($price['extension'] == 1) {
                 $extension_txt = '(' . $this->lng->txt('extension_price') . ')';
             }
             $price_row = new ilRadioOption($txt_price . ' ' . ilPaymentPrices::_formatPriceToString((double) $tmp_price) . ' ' . $extension_txt, $price['price_id']);
             $price_row->setInfo($price['description']);
             $rg_prices->addOption($price_row);
         }
         $form->addItem($rg_prices);
     }
     $form->addCommandButton('addToShoppingCart', $button_txt);
     return $this->tpl->setContent($form->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilShopPurchaseGUI.php


注:本文中的ilPropertyFormGUI::getHTML方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。