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


PHP ilConfirmationGUI::addButton方法代码示例

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


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

示例1: deleteTemplateConfirmationObject

 /**
  * Delete table template confirmation
  */
 function deleteTemplateConfirmationObject()
 {
     global $ilCtrl, $tpl, $lng;
     if (!is_array($_POST["tid"]) || count($_POST["tid"]) == 0) {
         ilUtil::sendInfo($lng->txt("no_checkbox"), true);
         $ilCtrl->redirect($this, "listTemplates");
     } else {
         include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
         $cgui = new ilConfirmationGUI();
         $cgui->setFormAction($ilCtrl->getFormAction($this));
         $cgui->setHeaderText($lng->txt("sty_confirm_template_deletion"));
         $cgui->setCancel($lng->txt("cancel"), "cancelTemplateDeletion");
         $cgui->setConfirm($lng->txt("sty_del_template"), "deleteTemplate");
         foreach ($_POST["tid"] as $tid) {
             $classes = $this->object->getTemplateClasses($tid);
             $cl_str = "";
             $listed = array();
             foreach ($classes as $cl) {
                 if ($cl != "" && !$listed[$cl]) {
                     $cl_str .= '<div>- ' . $cl . "</div>";
                     $listed[$cl] = true;
                 }
             }
             if ($cl_str != "") {
                 $cl_str = '<div style="padding-left:30px;" class="small">' . "<div><i>" . $lng->txt("sty_style_class") . "</i></div>" . $cl_str . "</div>";
             }
             $cgui->addItem("tid[]", $tid, $this->object->lookupTemplateName($tid) . $cl_str);
         }
         $cgui->addButton($lng->txt("sty_del_template_keep_classes"), "deleteTemplateKeepClasses");
         $tpl->setContent($cgui->getHTML());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjStyleSheetGUI.php

示例2: askDelete

 /**
  * ask delete
  *
  * @access protected
  * @return
  */
 protected function askDelete()
 {
     global $tpl;
     include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
     $this->ctrl->saveParameter($this, array('seed', 'app_id', 'dt', 'idate'));
     $confirm = new ilConfirmationGUI();
     $confirm->setFormAction($this->ctrl->getFormAction($this));
     $confirm->setHeaderText($this->lng->txt('cal_delete_app_sure'));
     $confirm->setCancel($this->lng->txt('cancel'), 'cancel');
     $confirm->addItem('appointments[]', $this->app->getEntryId(), $this->app->getTitle());
     include_once './Services/Calendar/classes/class.ilCalendarRecurrences.php';
     if (sizeof(ilCalendarRecurrences::_getRecurrences($_GET['app_id'])) && !$this->app->isMilestone()) {
         $confirm->addButton($this->lng->txt('cal_delete_single'), 'deleteexclude');
         $confirm->setConfirm($this->lng->txt('cal_delete_recurrences'), 'delete');
     } else {
         $confirm->setConfirm($this->lng->txt('delete'), 'delete');
     }
     $tpl->setContent($confirm->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilCalendarAppointmentGUI.php

示例3: updateObject

 /**
  * update GroupObject
  * @param bool update group type
  * @access public
  */
 public function updateObject()
 {
     global $ilErr;
     $this->checkPermission('write');
     $this->initForm();
     $this->form->checkInput();
     $old_type = $this->object->getGroupType();
     $this->load();
     $ilErr->setMessage('');
     if (!$this->object->validate()) {
         $err = $this->lng->txt('err_check_input');
         ilUtil::sendFailure($err);
         $err = $ilErr->getMessage();
         ilUtil::sendInfo($err);
         $this->editObject();
         return true;
     }
     $modified = false;
     if ($this->object->isGroupTypeModified($old_type) and !$update_group_type) {
         $modified = true;
         $this->object->setGroupType($old_type);
     }
     $this->object->update();
     include_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';
     ilObjectServiceSettingsGUI::updateServiceSettingsForm($this->object->getId(), $this->form, array(ilObjectServiceSettingsGUI::CALENDAR_VISIBILITY, ilObjectServiceSettingsGUI::NEWS_VISIBILITY));
     // Save sorting
     include_once './Services/Container/classes/class.ilContainerSortingSettings.php';
     $sort = new ilContainerSortingSettings($this->object->getId());
     $sort->setSortMode((int) $_POST['sor']);
     $sort->update();
     // BEGIN ChangeEvents: Record update Object.
     require_once 'Services/Tracking/classes/class.ilChangeEvent.php';
     global $ilUser;
     ilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');
     ilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());
     // END PATCH ChangeEvents: Record update Object.
     // Update ecs export settings
     include_once 'Modules/Group/classes/class.ilECSGroupSettings.php';
     $ecs = new ilECSGroupSettings($this->object);
     $ecs->handleSettingsUpdate();
     if ($modified) {
         include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
         ilUtil::sendQuestion($this->lng->txt('grp_warn_grp_type_changed'));
         $confirm = new ilConfirmationGUI();
         $confirm->setFormAction($this->ctrl->getFormAction($this));
         $confirm->addItem('grp_type', $this->object->getGroupType(), $this->lng->txt('grp_info_new_grp_type') . ': ' . ($this->object->getGroupType() == GRP_TYPE_CLOSED ? $this->lng->txt('il_grp_status_open') : $this->lng->txt('il_grp_status_closed')));
         $confirm->addButton($this->lng->txt('grp_change_type'), 'updateGroupType');
         $confirm->setCancel($this->lng->txt('cancel'), 'edit');
         $this->tpl->setContent($confirm->getHTML());
         return true;
     } else {
         ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
         $this->ctrl->redirect($this, 'edit');
         return true;
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:61,代码来源:class.ilObjGroupGUI.php

示例4: editStatistic

 public function editStatistic($a_show_confirm_delete = false)
 {
     global $ilToolbar;
     if (!isset($_GET['booking_id'])) {
         ilUtil::sendInfo($this->lng->txt('paya_no_booking_id_given'));
         $this->showStatistics();
         return true;
     }
     include_once './Services/Utilities/classes/class.ilConfirmationGUI.php';
     $ilToolbar->addButton($this->lng->txt('back'), $this->ctrl->getLinkTarget($this, 'showStatistics'));
     $this->tpl->addBlockfile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     $this->ctrl->setParameter($this, 'booking_id', (int) $_GET['booking_id']);
     $this->__initBookingObject();
     $bookings = $this->booking_obj->getBookings();
     $booking = $bookings[(int) $_GET['booking_id']];
     // confirm delete
     if ($a_show_confirm_delete) {
         $pobject_data = ilPaymentObject::_getObjectData($booking['pobject_id']);
         $tmp_obj = ilObject::_lookupTitle(ilObject::_lookupObjId($pobject_data['ref_id']));
         $type = ilObject::_lookupType(ilObject::_lookupObjId($pobject_data['ref_id']));
         $oConfirmationGUI = new ilConfirmationGUI();
         // set confirm/cancel commands
         $oConfirmationGUI->setFormAction($this->ctrl->getFormAction($this, "performDelete"));
         $oConfirmationGUI->setHeaderText($this->lng->txt("paya_sure_delete_stat"));
         $oConfirmationGUI->setCancel($this->lng->txt("cancel"), "editStatistic");
         if ($type == 'crs') {
             $oConfirmationGUI->addButton($this->lng->txt("confirm"), "performDeleteDeassignCrs");
         } else {
             $oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "performDelete");
         }
         $oConfirmationGUI->addItem('booking_id', $_GET['booking_id'], $tmp_obj);
         $this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHTML());
         return true;
     }
     // get customer_obj
     $tmp_user = ilObjectFactory::getInstanceByObjId($booking['customer_id'], false);
     $oForm = new ilPropertyFormGUI();
     $oForm->setFormAction($this->ctrl->getFormAction($this));
     $oForm->setId('stat_form');
     $oForm->setTableWidth('50 %');
     if (is_object($tmp_user)) {
         $frm_user = $tmp_user->getFullname() . ' [' . $tmp_user->getLogin() . ']';
     } else {
         $frm_user = $this->lng->txt('user_deleted');
     }
     $oForm->setTitle($frm_user);
     $pObj = new ilPaymentObject($this->user_obj, $booking['pobject_id']);
     $tmp_obj = ilObject::_lookupTitle(ilObject::_lookupObjId($pObj->getRefId()));
     // object_title
     $oTitleGUI = new ilNonEditableValueGUI($this->lng->txt('title'));
     $oTitleGUI->setValue($tmp_obj != '' ? $tmp_obj : $this->lng->txt('object_deleted'));
     $oForm->addItem($oTitleGUI);
     // transaction
     $oTransactionGUI = new ilNonEditableValueGUI($this->lng->txt('paya_transaction'));
     $oTransactionGUI->setValue($booking['transaction']);
     $oForm->addItem($oTransactionGUI);
     //vendor
     $oVendorGUI = new ilNonEditableValueGUI($this->lng->txt('paya_vendor'));
     $tmp_vendor = ilObjectFactory::getInstanceByObjId($booking['b_vendor_id'], false);
     if (is_object($tmp_vendor)) {
         $frm_vendor = $tmp_vendor->getFullname() . ' [' . $tmp_vendor->getLogin() . ']';
     } else {
         $frm_vendor = $this->lng->txt('user_deleted');
     }
     $oVendorGUI->setValue($frm_vendor);
     $oForm->addItem($oVendorGUI);
     // paymethod
     $oPaymethodGUI = new ilNonEditableValueGUI($this->lng->txt('paya_pay_method'));
     $oPaymethodGUI->setValue(ilPayMethods::getStringByPaymethod($booking['b_pay_method']));
     $oForm->addItem($oPaymethodGUI);
     // order_date
     $oOrderdateGUI = new ilNonEditableValueGUI($this->lng->txt('paya_order_date'));
     $oOrderdateGUI->setValue(ilDatePresentation::formatDate(new ilDateTime($booking["order_date"], IL_CAL_UNIX)));
     $oForm->addItem($oOrderdateGUI);
     // duration
     $oDurationGUI = new ilNonEditableValueGUI($this->lng->txt('duration'));
     if ($booking['duration'] == 0 && $booking['access_enddate'] == NULL) {
         $frm_duration = $this->lng->txt("unlimited_duration");
     } else {
         if ($booking['duration'] > 0) {
             $frm_duration = $booking['duration'] . ' ' . $this->lng->txt('paya_months');
         }
         $frm_duration .= ilDatePresentation::formatDate(new ilDate($booking['access_startdate'], IL_CAL_DATETIME)) . ' - ' . ilDatePresentation::formatDate(new ilDate($booking['access_enddate'], IL_CAL_DATETIME));
     }
     $oDurationGUI->setValue($frm_duration);
     $oForm->addItem($oDurationGUI);
     // price
     $oPriceGUI = new ilNonEditableValueGUI($this->lng->txt('price_a'));
     $oPriceGUI->setValue($booking['price'] . ' ' . $booking['currency_unit']);
     $oForm->addItem($oPriceGUI);
     // payed
     $oPayedGUI = new ilSelectInputGUI();
     $payed_option = array(0 => $this->lng->txt('no'), 1 => $this->lng->txt('yes'));
     $oPayedGUI->setTitle($this->lng->txt('paya_payed'));
     $oPayedGUI->setOptions($payed_option);
     $oPayedGUI->setValue($booking['payed']);
     $oPayedGUI->setPostVar('payed');
     $oForm->addItem($oPayedGUI);
     // access
     $oAccessGUI = new ilSelectInputGUI();
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilPaymentStatisticGUI.php

示例5: deleteMultipleObject

 /**
  * Shows confirmation view for deleting multiple smilies
  * Prepares confirmation view for deleting multiple smilies and displays it.
  */
 public function deleteMultipleObject()
 {
     /**
      * @var $rbacsystem ilRbacSystem
      * @var $lng ilLanguage
      * @var $ilCtrl ilCtrl
      * @var $tpl ilTemplate
      */
     global $rbacsystem, $lng, $ilCtrl, $tpl;
     $this->gui->switchToVisibleMode();
     if (!$rbacsystem->checkAccess('write', $this->gui->ref_id)) {
         $this->ilias->raiseError($this->lng->txt('msg_no_perm_write'), $this->ilias->error_obj->MESSAGE);
     }
     $items = (array) $_REQUEST['smiley_id'];
     if (count($items) == 0) {
         ilUtil::sendInfo($lng->txt('select_one'), true);
         $ilCtrl->redirect($this->gui, 'smiley');
     }
     include_once 'Modules/Chatroom/classes/class.ilChatroomSmilies.php';
     $smilies = ilChatroomSmilies::_getSmiliesById($items);
     if (count($smilies) == 0) {
         ilUtil::sendInfo($lng->txt('select_one'), true);
         $ilCtrl->redirect($this->gui, 'smiley');
     }
     require_once 'Services/Utilities/classes/class.ilConfirmationGUI.php';
     $confirmation = new ilConfirmationGUI();
     $confirmation->setFormAction($ilCtrl->getFormAction($this->gui, 'smiley'));
     $confirmation->setHeaderText($lng->txt('chatroom_confirm_delete_smiley'));
     $confirmation->addButton($lng->txt('confirm'), 'smiley-confirmedDeleteMultipleObject');
     $confirmation->addButton($lng->txt('cancel'), 'smiley');
     foreach ($smilies as $s) {
         $confirmation->addItem('sel_ids[]', $s['smiley_id'], ilUtil::img($s['smiley_fullpath'], $s['smiley_keywords']) . ' ' . $s['smiley_keywords']);
     }
     $tpl->setContent($confirmation->getHTML());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:39,代码来源:class.ilChatroomSmileyTask.php


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