本文整理汇总了PHP中ilConfirmationGUI::addHiddenItem方法的典型用法代码示例。如果您正苦于以下问题:PHP ilConfirmationGUI::addHiddenItem方法的具体用法?PHP ilConfirmationGUI::addHiddenItem怎么用?PHP ilConfirmationGUI::addHiddenItem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilConfirmationGUI
的用法示例。
在下文中一共展示了ilConfirmationGUI::addHiddenItem方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: confirmRemove
function confirmRemove()
{
global $ilAccess, $ilCtrl, $lng, $tpl;
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($ilCtrl->getFormAction($this, 'remove'));
$confirm->addHiddenItem("grp_id", $_GET["grp_id"]);
$confirm->setHeaderText($lng->txt('grp_dismiss_member'));
$confirm->setConfirm($lng->txt('confirm'), 'remove');
$confirm->setCancel($lng->txt('cancel'), 'show');
include_once './Services/User/classes/class.ilUserUtil.php';
$confirm->addItem('usr_id', $_GET["usr_id"], ilUserUtil::getNamePresentation($_GET["usr_id"], false, false, "", true), ilUtil::getImagePath('icon_usr.svg'));
$tpl->setContent($confirm->getHTML());
}
示例2: showActionConfirmation
/**
* display activation confirmation screen
*/
function showActionConfirmation($action, $a_from_search = false)
{
$user_ids = $this->getActionUserIds();
if (!$user_ids) {
$this->ilias->raiseError($this->lng->txt("no_checkbox"), $this->ilias->error_obj->MESSAGE);
}
if (strcmp($action, "accessRestrict") == 0) {
return $this->setAccessRestrictionObject(null, $a_from_search);
}
if (strcmp($action, "mail") == 0) {
return $this->mailObject();
}
unset($this->data);
if (!$a_from_search) {
$cancel = "cancelUserFolderAction";
} else {
$cancel = "cancelSearchAction";
}
// display confirmation message
include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($this->ctrl->getFormAction($this));
$cgui->setHeaderText($this->lng->txt("info_" . $action . "_sure"));
$cgui->setCancel($this->lng->txt("cancel"), $cancel);
$cgui->setConfirm($this->lng->txt("confirm"), "confirm" . $action);
if ($a_from_search) {
$cgui->addHiddenItem("frsrch", 1);
}
foreach ($user_ids as $id) {
$user = new ilObjUser($id);
$login = $user->getLastLogin();
if (!$login) {
$login = $this->lng->txt("never");
} else {
$login = ilDatePresentation::formatDate(new ilDateTime($login, IL_CAL_DATETIME));
}
$caption = $user->getFullname() . " (" . $user->getLogin() . ")" . ", " . $user->getEmail() . " - " . $this->lng->txt("last_login") . ": " . $login;
$cgui->addItem("id[]", $id, $caption);
}
$this->tpl->setContent($cgui->getHTML());
return true;
}
示例3: delete
/**
* Delete confirmation
*/
protected function delete()
{
global $ilTabs;
$this->initSettings((int) $_REQUEST['server_id']);
$ilTabs->clearTargets();
$ilTabs->clearSubTabs();
$ilTabs->setBackTarget($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'overview'));
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($this->ctrl->getFormAction($this));
$confirm->setConfirm($this->lng->txt('delete'), 'doDelete');
$confirm->setCancel($this->lng->txt('cancel'), 'overview');
$confirm->setHeaderText($this->lng->txt('ecs_delete_setting'));
$confirm->addItem('', '', $this->settings->getServer());
$confirm->addHiddenItem('server_id', $this->settings->getServerId());
$this->tpl->setContent($confirm->getHTML());
}
示例4: confirmDelete
/**
* confirmDelete
*/
public function confirmDelete()
{
global $ilCtrl, $lng, $tpl;
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$conf = new ilConfirmationGUI();
$conf->setFormAction($ilCtrl->getFormAction($this));
$conf->setHeaderText($lng->txt('dcl_confirm_delete_record'));
$record = ilDataCollectionCache::getRecordCache($this->record_id);
$conf->addItem('record_id', $record->getId(), implode(", ", $record->getRecordFieldValues()));
$conf->addHiddenItem('table_id', $this->table_id);
$conf->setConfirm($lng->txt('delete'), 'delete');
$conf->setCancel($lng->txt('cancel'), 'cancelDelete');
$tpl->setContent($conf->getHTML());
}
示例5: showConfirmation
private function showConfirmation(ilPropertyFormGUI $form, $oldQuestionSetType, $newQuestionSetType, $hasQuestionsWithoutQuestionpool)
{
require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirmation = new ilConfirmationGUI();
$headerText = sprintf($this->lng->txt('tst_change_quest_set_type_from_old_to_new_with_conflict'), $this->getQuestionSetTypeTranslation($oldQuestionSetType), $this->getQuestionSetTypeTranslation($newQuestionSetType));
if ($hasQuestionsWithoutQuestionpool) {
$headerText .= '<br /><br />' . $this->lng->txt("tst_nonpool_questions_get_lost_warning");
}
$confirmation->setHeaderText($headerText);
$confirmation->setFormAction($this->ctrl->getFormAction($this));
$confirmation->setCancel($this->lng->txt('cancel'), self::CMD_SHOW_FORM);
$confirmation->setConfirm($this->lng->txt('confirm'), self::CMD_CONFIRMED_SAVE_FORM);
foreach ($form->getInputItemsRecursive() as $key => $item) {
//vd("$key // {$item->getType()} // ".json_encode($_POST[$item->getPostVar()]));
switch ($item->getType()) {
case 'section_header':
continue;
case 'datetime':
list($date, $time) = explode(' ', $item->getDate()->get(IL_CAL_DATETIME));
if ($item->getMode() == ilDateTimeInputGUI::MODE_SELECT) {
list($y, $m, $d) = explode('-', $date);
$confirmation->addHiddenItem("{$item->getPostVar()}[date][y]", $y);
$confirmation->addHiddenItem("{$item->getPostVar()}[date][m]", $m);
$confirmation->addHiddenItem("{$item->getPostVar()}[date][d]", $d);
if ($item->getShowTime()) {
list($h, $m, $s) = explode('-', $time);
$confirmation->addHiddenItem("{$item->getPostVar()}[time][h]", $h);
$confirmation->addHiddenItem("{$item->getPostVar()}[time][m]", $m);
$confirmation->addHiddenItem("{$item->getPostVar()}[time][s]", $s);
}
} else {
$confirmation->addHiddenItem("{$item->getPostVar()}[date]", $date);
$confirmation->addHiddenItem("{$item->getPostVar()}[time]", $time);
}
break;
case 'duration':
$confirmation->addHiddenItem("{$item->getPostVar()}[MM]", (int) $item->getMonths());
$confirmation->addHiddenItem("{$item->getPostVar()}[dd]", (int) $item->getDays());
$confirmation->addHiddenItem("{$item->getPostVar()}[hh]", (int) $item->getHours());
$confirmation->addHiddenItem("{$item->getPostVar()}[mm]", (int) $item->getMinutes());
$confirmation->addHiddenItem("{$item->getPostVar()}[ss]", (int) $item->getSeconds());
break;
case 'checkboxgroup':
if (is_array($item->getValue())) {
foreach ($item->getValue() as $option) {
$confirmation->addHiddenItem("{$item->getPostVar()}[]", $option);
}
}
break;
case 'checkbox':
if ($item->getChecked()) {
$confirmation->addHiddenItem($item->getPostVar(), 1);
}
break;
default:
$confirmation->addHiddenItem($item->getPostVar(), $item->getValue());
}
}
$this->tpl->setContent($this->ctrl->getHTML($confirmation));
}
示例6: deleteCoreCharMessage
/**
* Message that appears, when user tries to delete core characteristics
*
* @param
* @return
*/
function deleteCoreCharMessage()
{
global $ilCtrl, $tpl, $lng;
include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
$cgui->setFormAction($ilCtrl->getFormAction($this));
$core_styles = ilObjStyleSheet::_getCoreStyles();
$cnt = 0;
foreach ($_POST["char"] as $char) {
if (!empty($core_styles[$char])) {
$cnt++;
$char_comp = explode(".", $char);
$cgui->addItem("", "", $char_comp[2]);
} else {
$cgui->addHiddenItem("char[]", $char);
}
}
$all_core_styles = $cnt == count($_POST["char"]) ? true : false;
if ($all_core_styles) {
$cgui->setHeaderText($lng->txt("sty_all_styles_obligatory"));
$cgui->setCancel($lng->txt("back"), "cancelCharacteristicDeletion");
} else {
$cgui->setHeaderText($lng->txt("sty_some_styles_obligatory_delete_rest"));
$cgui->setCancel($lng->txt("cancel"), "cancelCharacteristicDeletion");
$cgui->setConfirm($lng->txt("sty_delete_other_selected"), "deleteCharacteristicConfirmation");
}
$tpl->setContent($cgui->getHTML());
}
示例7: confirmDelete
public function confirmDelete()
{
$conf = new ilConfirmationGUI();
$conf->setFormAction($this->ctrl->getFormAction($this));
$conf->setHeaderText($this->lng->txt('dcl_confirm_delete_record'));
$record = ilDataCollectionCache::getRecordCache($this->record_id);
$conf->addItem('record_id', $record->getId(), implode(", ", $record->getRecordFieldValues()));
$conf->addHiddenItem('table_id', $this->table_id);
$conf->setConfirm($this->lng->txt('delete'), 'delete');
$conf->setCancel($this->lng->txt('cancel'), 'cancelDelete');
$this->tpl->setContent($conf->getHTML());
}
示例8: confirmRegrade
function confirmRegrade()
{
require_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$conf = new ilConfirmationGUI();
$conf->setFormAction($this->ctrl->getFormAction($this));
ilUtil::sendQuestion($this->lng->txt('rubric_regrade_warning'));
$conf->setFormAction($this->ctrl->getFormAction($this));
$conf->addHiddenItem('user_id', $_POST['user_id']);
$conf->setConfirm($this->lng->txt('rubric_regrade'), 'regradeUser');
$conf->setCancel($this->lng->txt('cancel'), 'cancelRegrade');
$this->tpl->setContent($conf->getHTML());
}
示例9: confirmDelete
public function confirmDelete($view)
{
global $ilUser, $rbacreview;
if (!$rbacreview->isAssigned($ilUser->getId(), SYSTEM_ROLE_ID)) {
$this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->MESSAGE);
}
if (!isset($_GET['news_id'])) {
ilUtil::sendInfo($this->lng->txt('payment_news_missing_id'));
switch ($view) {
case 'archive':
return $this->showArchive();
break;
case 'news':
default:
return $this->showNews();
break;
}
}
include_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
$c_gui = new ilConfirmationGUI();
$c_gui->setHeaderText($this->lng->txt('payment_news_delete_sure'));
$c_gui->addHiddenItem('news_id', (int) $_GET['news_id']);
$oNewsItem = new ilShopNewsItem($_GET['news_id']);
$title = $oNewsItem->getTitle();
$c_gui->addItem($news_title, $_GET['news_id'], $title);
switch ($view) {
case 'archive':
$c_gui->setFormAction($this->ctrl->getFormAction($this, 'performDeleteArchiveNews'));
$c_gui->setConfirm($this->lng->txt('confirm'), 'performDeleteArchiveNews');
$c_gui->setCancel($this->lng->txt('cancel'), 'showArchive');
$this->showArchive($c_gui->getHTML());
break;
case 'news':
default:
$c_gui->setFormAction($this->ctrl->getFormAction($this, 'performDeleteNews'));
$c_gui->setConfirm($this->lng->txt('confirm'), 'performDeleteNews');
$c_gui->setCancel($this->lng->txt('cancel'), 'showNews');
$this->showNews($c_gui->getHTML());
break;
}
return true;
}
示例10: confirmDeleteAppointment
protected function confirmDeleteAppointment($inRecurrence = false)
{
global $tpl, $ilTabs;
$ilTabs->activateTab('content');
try {
$booking_service = new ilViteroBookingSoapConnector();
$book = $booking_service->getBookingById($_REQUEST['bookid']);
} catch (ilViteroConnectorException $e) {
ilUtil::sendFailure($e->getMessage(), true);
$GLOBALS['ilCtrl']->redirect($this, 'showContent');
}
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));
$confirm->setHeaderText(ilViteroPlugin::getInstance()->txt('sure_delete_appointment'));
if ($inRecurrence) {
$start = new ilDateTime($_REQUEST['atime'], IL_CAL_UNIX);
$confirm->setConfirm($GLOBALS['lng']->txt('delete'), 'deleteBookingInSeries');
} else {
$start = ilViteroUtils::parseSoapDate($book->booking->start);
$confirm->setConfirm($GLOBALS['lng']->txt('delete'), 'deleteBooking');
}
ilDatePresentation::setUseRelativeDates(false);
$confirm->addItem('bookid[]', (int) $_REQUEST['bookid'], ilDatePresentation::formatDate($start));
if ($inRecurrence) {
$confirm->addHiddenItem('atime', $_REQUEST['atime']);
}
$confirm->setCancel($GLOBALS['lng']->txt('cancel'), 'showContent');
$tpl->setContent($confirm->getHTML());
}
示例11: showSyncOriginalConfirmationCmd
private function showSyncOriginalConfirmationCmd()
{
$questionId = (int) $_GET['question_id'];
require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirmation = new ilConfirmationGUI();
$confirmation->setHeaderText($this->lng->txt('qpl_sync_quest_skl_assigns_confirmation'));
$confirmation->setFormAction($this->ctrl->getFormAction($this));
$confirmation->addHiddenItem('question_id', $questionId);
$confirmation->setConfirm($this->lng->txt('yes'), self::CMD_SYNC_ORIGINAL);
$confirmation->setCancel($this->lng->txt('no'), self::CMD_SHOW_SKILL_QUEST_ASSIGNS);
$this->tpl->setContent($this->ctrl->getHTML($confirmation));
}
示例12: redirectLocToTestConfirmation
/**
* Show confirmation whether user wants to start a new run or resume a previous run
* @param type $a_objective_id
* @param type $a_test_id
*/
protected function redirectLocToTestConfirmation($a_objective_id, $a_test_id)
{
include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->setFormAction($GLOBALS['ilCtrl']->getFormAction($this));
if ($a_objective_id) {
$question = $this->lng->txt('crs_loc_objective_passed_confirmation');
} else {
$question = $this->lng->txt('crs_loc_objectives_passed_confirmation');
}
$confirm->addHiddenItem('objective_id', $a_objective_id);
$confirm->addHiddenItem('tid', $a_test_id);
$confirm->setConfirm($this->lng->txt('crs_loc_tst_start'), 'redirectLocToTestConfirmed');
$confirm->setCancel($this->lng->txt('cancel'), 'view');
ilUtil::sendQuestion($question);
$GLOBALS['tpl']->setContent($confirm->getHTML());
return true;
}
示例13: deleteCoupon
public function deleteCoupon()
{
$this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
if (!isset($_GET['coupon_id'])) {
return ilUtil::sendFailure($this->lng->txt('no_coupon_selected'));
}
# $this->ctrl->setParameter($this, 'coupon_id', $this->coupon_obj->getId());
$this->__showButtons();
ilUtil::sendQuestion($this->lng->txt('paya_coupons_sure_delete_selected_codes'));
$oConfirmationGUI = new ilConfirmationGUI();
// set confirm/cancel commands
$oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, 'performDeleteCoupon'));
$oConfirmationGUI->setHeaderText('');
$oConfirmationGUI->setCancel($this->lng->txt("cancel"), "showCoupons");
$oConfirmationGUI->setConfirm($this->lng->txt("confirm"), 'performDeleteCoupon');
$oConfirmationGUI->addItem('', '', ilPaymentCoupons::_lookupTitle($_GET['coupon_id']));
$oConfirmationGUI->addHiddenItem('coupon_id', $_GET['coupon_id']);
$this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHTML());
return true;
}
示例14: confirmDeletePass
public function confirmDeletePass()
{
if (!$this->object->isPassDeletionAllowed()) {
$this->ctrl->redirect($this, 'outUserResultsOverview');
}
global $tpl;
require_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
$confirm = new ilConfirmationGUI();
$confirm->addHiddenItem('active_id', $_GET['active_id']);
$confirm->addHiddenItem('pass', $_GET['pass']);
$confirm->setHeaderText($this->lng->txt('conf_delete_pass'));
$confirm->setFormAction($this->ctrl->getFormAction($this, 'post'));
$confirm->setHeaderText($this->lng->txt('conf_delete_pass'));
$confirm->setCancel($this->lng->txt('cancel'), 'outUserResultsOverview');
$confirm->setConfirm($this->lng->txt('delete'), 'performDeletePass');
$tpl->setContent($confirm->getHTML());
}
示例15: createRevokePrivilegeOfAccessingAndEditingPriviligesConfirmationDialog
/**
* Creates the confirmation dialog for revoking privileges by adding the names of the involved
* classes and by setting a json encoded post variable which includes all classes and the
* privileges of those classes that should be set. After the json_encoding all double quotes
* will be escaped ("" -> ") or otherwise the encoded string would be cut off after
* retrieving it.
*
* @param array $a_classes_with_ticked_privileges an associative array containing the class ids
* and its corresponding set privileges
*
* @return \ilConfirmationGUI
*/
private function createRevokePrivilegeOfAccessingAndEditingPriviligesConfirmationDialog($a_classes_with_ticked_privileges)
{
$confirmation_dialog = new ilConfirmationGUI();
$confirmation_dialog->setFormAction($this->ctrl->getFormAction($this));
$confirmation_dialog->setHeaderText($this->lng->txt("rep_robj_xrs_privileges_confirm_privilege_revoking_question"));
$endangered_class_ids = $this->getClassIdsForEndangeredPrivilegeOfAccessingAndEditingPrivileges($a_classes_with_ticked_privileges);
foreach ($endangered_class_ids as $class_id) {
$classById = $this->privileges->getClassById($class_id);
$confirmation_dialog->addItem("", "", $classById["name"]);
}
$post_privileges = htmlspecialchars(json_encode($a_classes_with_ticked_privileges));
$confirmation_dialog->addHiddenItem("confirmed_privileges", $post_privileges);
$confirmation_dialog->setConfirm($this->lng->txt("rep_robj_xrs_privileges_confirm_privilege_revoking"), "revokeAccessingAndEditingPrivilegesAfterConfirmation");
$confirmation_dialog->setCancel($this->lng->txt("cancel"), "showPrivileges");
return $confirmation_dialog;
}