• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP ilDateTimeInputGUI类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: initAddCodesForm

 function initAddCodesForm()
 {
     global $ilCtrl, $lng;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form_gui = new ilPropertyFormGUI();
     $this->form_gui->setFormAction($ilCtrl->getFormAction($this, 'createCodes'));
     $this->form_gui->setTitle($lng->txt('user_account_codes_edit_header'));
     $count = new ilNumberInputGUI($lng->txt('user_account_codes_number'), 'acc_codes_number');
     $count->setSize(4);
     $count->setMaxLength(4);
     $count->setMinValue(1);
     $count->setMaxValue(1000);
     $count->setRequired(true);
     $this->form_gui->addItem($count);
     $valid = new ilRadioGroupInputGUI($lng->txt('user_account_code_valid_until'), 'valid_type');
     $valid->setRequired(true);
     $unl = new ilRadioOption($lng->txt('user_account_code_valid_until_unlimited'), 'valid_unlimited');
     $valid->addOption($unl);
     $st = new ilRadioOption($lng->txt('user_account_code_valid_until_static'), 'valid_static');
     $valid->addOption($st);
     $dt = new ilDateTimeInputGUI($lng->txt('date'), 'valid_date');
     $dt->setRequired(true);
     $st->addSubItem($dt);
     $dyn = new ilRadioOption($lng->txt('user_account_code_valid_until_dynamic'), 'valid_dynamic');
     $valid->addOption($dyn);
     $ds = new ilNumberInputGUI($lng->txt('days'), 'valid_days');
     $ds->setSize(5);
     $ds->setRequired(true);
     $dyn->addSubItem($ds);
     $this->form_gui->addItem($valid);
     $this->form_gui->addCommandButton('createCodes', $lng->txt('create'));
     $this->form_gui->addCommandButton('listCodes', $lng->txt('cancel'));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:33,代码来源:class.ilAccountCodesGUI.php


示例2: addToForm

 public function addToForm()
 {
     global $lng;
     if ($this->getForm() instanceof ilPropertyFormGUI) {
         // :TODO: use DateDurationInputGUI ?!
         if (!(bool) $this->text_input) {
             $check = new ilCheckboxInputGUI($this->getTitle(), $this->addToElementId("tgl"));
             $check->setValue(1);
             $checked = false;
         } else {
             $check = new ilCustomInputGUI($this->getTitle());
         }
         $date_from = new ilDateTimeInputGUI($lng->txt('from'), $this->addToElementId("lower"));
         $date_from->setShowTime(true);
         $check->addSubItem($date_from);
         if ($this->getLowerADT()->getDate() && !$this->getLowerADT()->isNull()) {
             $date_from->setDate($this->getLowerADT()->getDate());
             $checked = true;
         }
         $date_until = new ilDateTimeInputGUI($lng->txt('until'), $this->addToElementId("upper"));
         $date_until->setShowTime(true);
         $check->addSubItem($date_until);
         if ($this->getUpperADT()->getDate() && !$this->getUpperADT()->isNull()) {
             $date_until->setDate($this->getUpperADT()->getDate());
             $checked = true;
         }
         if (!(bool) $this->text_input) {
             $check->setChecked($checked);
         } else {
             $date_from->setMode(ilDateTimeInputGUI::MODE_INPUT);
             $date_until->setMode(ilDateTimeInputGUI::MODE_INPUT);
         }
         $this->addToParentElement($check);
     } else {
         // see ilTable2GUI::addFilterItemByMetaType()
         include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
         include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
         $item = new ilCombinationInputGUI($this->getTitle(), $this->getElementId());
         $lower = new ilDateTimeInputGUI("", $this->addToElementId("lower"));
         $lower->setShowTime(true);
         $item->addCombinationItem("lower", $lower, $lng->txt("from"));
         if ($this->getLowerADT()->getDate() && !$this->getLowerADT()->isNull()) {
             $lower->setDate($this->getLowerADT()->getDate());
         }
         $upper = new ilDateTimeInputGUI("", $this->addToElementId("upper"));
         $upper->setShowTime(true);
         $item->addCombinationItem("upper", $upper, $lng->txt("to"));
         if ($this->getUpperADT()->getDate() && !$this->getUpperADT()->isNull()) {
             $upper->setDate($this->getUpperADT()->getDate());
         }
         $item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
         $item->setMode(ilDateTimeInputGUI::MODE_INPUT);
         $this->addToParentElement($item);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:55,代码来源:class.ilADTDateTimeSearchBridgeRange.php


示例3: addToForm

 public function addToForm()
 {
     $adt_date = $this->getADT()->getDate();
     $date = new ilDateTimeInputGUI($this->getTitle(), $this->getElementId());
     $date->setShowTime(false);
     $this->addBasicFieldProperties($date, $this->getADT()->getCopyOfDefinition());
     if ((bool) $this->text_input) {
         $date->setMode(ilDateTimeInputGUI::MODE_INPUT);
     } else {
         if (!$this->isRequired()) {
             $date->enableDateActivation("", $this->getElementId() . "_tgl", !(!$adt_date || $adt_date->isNull()));
         }
     }
     $date->setDate($adt_date);
     $this->addToParentElement($date);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilADTDateFormBridge.php


示例4: addCustomEditForm

 protected function addCustomEditForm(ilPropertyFormGUI $a_form)
 {
     $radio_grp = new ilRadioGroupInputGUI($this->lng->txt('grp_visibility'), 'activation_type');
     $radio_grp->setValue($this->object->getAvailabilityType());
     $radio_grp->setDisabled(true);
     $radio_opt = new ilRadioOption($this->lng->txt('grp_visibility_unvisible'), ilObjRemoteTest::ACTIVATION_OFFLINE);
     $radio_grp->addOption($radio_opt);
     $radio_opt = new ilRadioOption($this->lng->txt('grp_visibility_limitless'), ilObjRemoteTest::ACTIVATION_UNLIMITED);
     $radio_grp->addOption($radio_opt);
     // :TODO: not supported in ECS yet
     $radio_opt = new ilRadioOption($this->lng->txt('grp_visibility_until'), ilObjRemoteTest::ACTIVATION_LIMITED);
     $start = new ilDateTimeInputGUI($this->lng->txt('grp_start'), 'start');
     $start->setDate(new ilDateTime(time(), IL_CAL_UNIX));
     $start->setDisabled(true);
     $start->setShowTime(true);
     $radio_opt->addSubItem($start);
     $end = new ilDateTimeInputGUI($this->lng->txt('grp_end'), 'end');
     $end->setDate(new ilDateTime(time(), IL_CAL_UNIX));
     $end->setDisabled(true);
     $end->setShowTime(true);
     $radio_opt->addSubItem($end);
     $radio_grp->addOption($radio_opt);
     $a_form->addItem($radio_grp);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:24,代码来源:class.ilObjRemoteTestGUI.php


示例5: addToForm

 public function addToForm()
 {
     global $lng;
     $adt_date = $this->getADT()->getDate();
     $date = new ilDateTimeInputGUI($this->getTitle(), $this->getElementId());
     $date->setShowTime(true);
     if (!(bool) $this->text_input) {
         $checked = !(!$adt_date || $adt_date->isNull());
         $date->enableDateActivation($lng->txt("enabled"), $this->addToElementId("tgl"), $checked);
     } else {
         $date->setMode(ilDateTimeInputGUI::MODE_INPUT);
     }
     $date->setDate($adt_date);
     $this->addToParentElement($date);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilADTDateTimeSearchBridgeSingle.php


示例6: initDateForm

 function initDateForm()
 {
     global $lng, $ilCtrl;
     include_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitle($lng->txt('blog_edit_date'));
     $date = new ilDateTimeInputGUI($lng->txt("date"), "date");
     $date->setRequired(true);
     $date->setShowTime(true);
     $date->setInfo($lng->txt('blog_edit_date_info'));
     $form->addItem($date);
     $date->setDate($this->getPageObject()->getCreated());
     $form->addCommandButton('updateDate', $lng->txt('save'));
     $form->addCommandButton('preview', $lng->txt('cancel'));
     return $form;
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:17,代码来源:class.ilBlogPostingGUI.php


示例7: initAssignmentForm

 /**
  * Init assignment form.
  *
  * @param        int        $a_mode        "create"/"edit"
  */
 public function initAssignmentForm($a_mode = "create")
 {
     global $lng, $ilCtrl, $ilSetting;
     // init form
     $lng->loadLanguageModule("form");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setTableWidth("600px");
     if ($a_mode == "edit") {
         $this->form->setTitle($lng->txt("exc_edit_assignment"));
     } else {
         $this->form->setTitle($lng->txt("exc_new_assignment"));
     }
     $this->form->setFormAction($ilCtrl->getFormAction($this));
     // type
     include_once "./Modules/Exercise/classes/class.ilExAssignment.php";
     $types = array(ilExAssignment::TYPE_UPLOAD => $this->lng->txt("exc_type_upload"), ilExAssignment::TYPE_UPLOAD_TEAM => $this->lng->txt("exc_type_upload_team"), ilExAssignment::TYPE_TEXT => $this->lng->txt("exc_type_text"));
     if (!$ilSetting->get('disable_wsp_blogs')) {
         $types[ilExAssignment::TYPE_BLOG] = $this->lng->txt("exc_type_blog");
     }
     if ($ilSetting->get('user_portfolios')) {
         $types[ilExAssignment::TYPE_PORTFOLIO] = $this->lng->txt("exc_type_portfolio");
     }
     if (sizeof($types) > 1) {
         $ty = new ilSelectInputGUI($this->lng->txt("exc_assignment_type"), "type");
         $ty->setOptions($types);
         $ty->setRequired(true);
     } else {
         $ty = new ilHiddenInputGUI("type");
         $ty->setValue(ilExAssignment::TYPE_UPLOAD);
     }
     $this->form->addItem($ty);
     // title
     $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
     $ti->setMaxLength(200);
     $ti->setRequired(true);
     $this->form->addItem($ti);
     // start time y/n
     $cb = new ilCheckboxInputGUI($this->lng->txt("exc_start_time"), "start_time_cb");
     $this->form->addItem($cb);
     // start time
     $edit_date = new ilDateTimeInputGUI("", "start_time");
     $edit_date->setShowTime(true);
     $cb->addSubItem($edit_date);
     // deadline y/n
     $dcb = new ilCheckboxInputGUI($this->lng->txt("exc_deadline"), "deadline_cb");
     $dcb->setChecked(true);
     $this->form->addItem($dcb);
     // Deadline
     $edit_date = new ilDateTimeInputGUI($lng->txt(""), "deadline");
     $edit_date->setShowTime(true);
     $dcb->addSubItem($edit_date);
     // mandatory
     $cb = new ilCheckboxInputGUI($this->lng->txt("exc_mandatory"), "mandatory");
     $cb->setInfo($this->lng->txt("exc_mandatory_info"));
     $cb->setChecked(true);
     $this->form->addItem($cb);
     // Work Instructions
     $desc_input = new ilTextAreaInputGUI($lng->txt("exc_instruction"), "instruction");
     $desc_input->setRows(20);
     $desc_input->setUseRte(true);
     $desc_input->setRteTagSet("mini");
     $this->form->addItem($desc_input);
     // files
     if ($a_mode == "create") {
         $files = new ilFileWizardInputGUI($this->lng->txt('objs_file'), 'files');
         $files->setFilenames(array(0 => ''));
         $this->form->addItem($files);
     }
     // peer review
     $peer = new ilCheckboxInputGUI($lng->txt("exc_peer_review"), "peer");
     $peer->setInfo($this->lng->txt("exc_peer_review_ass_setting_info"));
     $this->form->addItem($peer);
     if ($a_mode == "create") {
         $peer->setInfo($lng->txt("exc_peer_review_info"));
     }
     $peer_min = new ilNumberInputGUI($lng->txt("exc_peer_review_min_number"), "peer_min");
     $peer_min->setInfo($lng->txt("exc_peer_review_min_number_info"));
     $peer_min->setRequired(true);
     $peer_min->setValue(5);
     $peer_min->setSize(3);
     $peer_min->setValue(2);
     $peer->addSubItem($peer_min);
     $peer_dl = new ilDateTimeInputGUI($lng->txt("exc_peer_review_deadline"), "peer_dl");
     $peer_dl->setInfo($lng->txt("exc_peer_review_deadline_info"));
     $peer_dl->enableDateActivation("", "peer_dl_tgl");
     $peer_dl->setShowTime(true);
     $peer->addSubItem($peer_dl);
     $peer_file = new ilCheckboxInputGUI($lng->txt("exc_peer_review_file"), "peer_file");
     $peer_file->setInfo($lng->txt("exc_peer_review_file_info"));
     $peer->addSubItem($peer_file);
     $peer_prsl = new ilCheckboxInputGUI($lng->txt("exc_peer_review_personal"), "peer_prsl");
     $peer_prsl->setInfo($lng->txt("exc_peer_review_personal_info"));
     $peer->addSubItem($peer_prsl);
     if ($a_mode != "create" && $this->ass && $this->ass->getDeadline() && $this->ass->getDeadline() < time()) {
//.........这里部分代码省略.........
开发者ID:bheyser,项目名称:qplskl,代码行数:101,代码来源:class.ilObjExerciseGUI.php


示例8: initAccessRestrictionForm

 protected function initAccessRestrictionForm($a_from_search = false)
 {
     $user_ids = $this->getActionUserIds();
     if (!$user_ids) {
         ilUtil::sendFailure($this->lng->txt('select_one'));
         return $this->viewObject();
     }
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setTitle($this->lng->txt("time_limit_add_time_limit_for_selected"));
     $form->setFormAction($this->ctrl->getFormAction($this, "confirmaccessRestrict"));
     $from = new ilDateTimeInputGUI($this->lng->txt("access_from"), "from");
     $from->setShowTime(true);
     $from->setRequired(true);
     $form->addItem($from);
     $to = new ilDateTimeInputGUI($this->lng->txt("access_until"), "to");
     $to->setRequired(true);
     $to->setShowTime(true);
     $form->addItem($to);
     $form->addCommandButton("confirmaccessRestrict", $this->lng->txt("confirm"));
     $form->addCommandButton("view", $this->lng->txt("cancel"));
     foreach ($user_ids as $user_id) {
         $ufield = new ilHiddenInputGUI("id[]");
         $ufield->setValue($user_id);
         $form->addItem($ufield);
     }
     // return to search?
     if ($a_from_search || $_POST["frsrch"]) {
         $field = new ilHiddenInputGUI("frsrch");
         $field->setValue(1);
         $form->addItem($field);
     }
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:34,代码来源:class.ilObjUserFolderGUI.php


示例9: initFormEdit

 /**
  * init form edit
  *
  * @access protected
  * @return
  */
 protected function initFormEdit()
 {
     global $tree;
     include_once "Services/Object/classes/class.ilObjectActivation.php";
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($this->ctrl->getFormAction($this));
     $title = ilObject::_lookupTitle(ilObject::_lookupObjId($this->getItemId()));
     $this->form->setTitle($title . ': ' . $this->lng->txt('crs_edit_timings'));
     $timings = new ilRadioGroupInputGUI($this->lng->txt('timings'), 'timing_type');
     // opt deactivated
     $dea = new ilRadioOption($this->lng->txt('crs_timings_disabled'), ilObjectActivation::TIMINGS_DEACTIVATED);
     $dea->setInfo($this->lng->txt('crs_timings_disabled_info'));
     $timings->addOption($dea);
     // Visiblity
     $vis = new ilRadioOption($this->lng->txt('crs_timings_availability_enabled'), ilObjectActivation::TIMINGS_ACTIVATION);
     #$vis->setInfo($this->lng->txt('crs_timings_visibility'));
     $start = new ilDateTimeInputGUI($this->lng->txt('crs_timings_start'), 'timing_start');
     $start->setShowTime(true);
     #$start->setMinuteStepSize(5);
     $vis->addSubItem($start);
     $end = new ilDateTimeInputGUI($this->lng->txt('crs_timings_end'), 'timing_end');
     $end->setShowTime(true);
     #$end->setMinuteStepSize(5);
     $vis->addSubItem($end);
     $isv = new ilCheckboxInputGUI($this->lng->txt('crs_timings_visibility_short'), 'visible');
     $isv->setInfo($this->lng->txt('crs_timings_visibility'));
     $isv->setValue(1);
     $vis->addSubItem($isv);
     $timings->addOption($vis);
     // Timings
     $tim = new ilRadioOption($this->lng->txt('crs_timings_presetting'), ilObjectActivation::TIMINGS_PRESETTING);
     $tim->setInfo($this->lng->txt('crs_item_presetting_info'));
     $start = new ilDateTimeInputGUI($this->lng->txt('crs_timings_sug_begin'), 'sug_start');
     $tim->addSubItem($start);
     $end = new ilDateTimeInputGUI($this->lng->txt('crs_timings_sug_end'), 'sug_end');
     $tim->addSubItem($end);
     if ($tree->checkForParentType($this->parent_ref_id, 'crs')) {
         $cha = new ilCheckboxInputGUI($this->lng->txt('crs_timings_changeable'), 'changeable');
         $tim->addSubItem($cha);
         $start = new ilDateTimeInputGUI($this->lng->txt('crs_timings_early_begin'), 'early_start');
         $tim->addSubItem($start);
         $late = new ilDateTimeInputGUI($this->lng->txt('crs_timings_short_limit_start_end'), 'late_end');
         $tim->addSubItem($late);
     }
     $timings->addOption($tim);
     $this->form->addItem($timings);
     $this->form->addCommandButton('update', $this->lng->txt('save'));
     $this->form->addCommandButton('cancel', $this->lng->txt('cancel'));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:56,代码来源:class.ilObjectActivationGUI.php


示例10: initUpdateBookingForm

 protected function initUpdateBookingForm($booking)
 {
     global $lng;
     $lng->loadLanguageModule('dateplaner');
     $lng->loadLanguageModule('crs');
     include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
     $form = new ilPropertyFormGUI();
     $form->setFormAction($this->ctrl->getFormAction($this, 'showContent'));
     $form->setTitle(ilViteroPlugin::getInstance()->txt('tbl_update_appointment'));
     $form->addCommandButton('updateBooking', $GLOBALS['lng']->txt('save'));
     $form->addCommandButton('showContent', $GLOBALS['lng']->txt('cancel'));
     // Show only start if type is "cafe"
     if ($booking->booking->cafe) {
         $start = new ilDateTimeInputGUI($lng->txt('event_start_date'), 'cstart');
         $start->setShowTime(false);
         $start->setDate(ilViteroUtils::parseSoapDate($booking->booking->start));
         $form->addItem($start);
     } else {
         include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
         $dt = new ilDateDurationInputGUI($lng->txt('cal_fullday'), 'roomduration');
         $dt->setMinuteStepSize(15);
         $dt->setStartText($lng->txt('event_start_date'));
         $dt->setEndText($lng->txt('event_end_date'));
         $dt->setShowTime(true);
         $dt->setStart(ilViteroUtils::parseSoapDate($booking->booking->start));
         $dt->setEnd(ilViteroUtils::parseSoapDate($booking->booking->end));
         $form->addItem($dt);
         $this->initFormTimeBuffer($form);
         $form->getItemByPostVar('buffer_before')->setValue($booking->booking->startbuffer);
         $form->getItemByPostVar('buffer_after')->setValue($booking->booking->endbuffer);
     }
     return $form;
 }
开发者ID:leifos-gmbh,项目名称:Vitero,代码行数:33,代码来源:class.ilObjViteroGUI.php


示例11: getInputField

 /**
  * @param $type_id
  * @param ilDataCollectionField $field
  * @return ilCheckboxInputGUI|ilDateTimeInputGUI|ilFileInputGUI|ilTextInputGUI|NULL
  */
 static function getInputField(ilDataCollectionField $field)
 {
     global $lng;
     $type_id = $field->getDatatypeId();
     $title = $field->getTitle();
     switch ($type_id) {
         case ilDataCollectionDatatype::INPUTFORMAT_TEXT:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             if ($field->getTextArea()) {
                 $input = new ilTextAreaInputGUI($title, 'field_' . $field->getId());
             }
             if ($field->getLength()) {
                 $input->setInfo($lng->txt("dcl_max_text_length") . ": " . $field->getLength());
                 if (!$field->getTextArea()) {
                     $input->setMaxLength($field->getLength());
                 }
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_NUMBER:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_BOOLEAN:
             $input = new ilCheckboxInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_DATETIME:
             $input = new ilDateTimeInputGUI($title, 'field_' . $field->getId());
             $input->setStartYear(date("Y") - 100);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_FILE:
             $input = new ilFileInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_REFERENCE:
             if (!$field->isNRef()) {
                 $input = new ilSelectInputGUI($title, 'field_' . $field->getId());
             } else {
                 $input = new ilMultiSelectInputGUI($title, 'field_' . $field->getId());
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_RATING:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             $input->setValue($lng->txt("dcl_editable_in_table_gui"));
             $input->setDisabled(true);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_ILIAS_REF:
             $input = new ilDataCollectionTreePickInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_MOB:
             $input = new ilImageFileInputGUI($title, 'field_' . $field->getId());
             $input->setAllowDeletion(true);
             break;
     }
     if ($field->getDescription()) {
         $input->setInfo($field->getDescription() . ($input->getInfo() ? "<br>" . $input->getInfo() : ""));
     }
     return $input;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:61,代码来源:class.ilDataCollectionDatatype.php


示例12: initActivationForm

 /**
  * Init activation form
  */
 function initActivationForm()
 {
     global $ilCtrl, $lng;
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     $this->form->setFormAction($ilCtrl->getFormAction($this));
     $this->form->setTitle($lng->txt("cont_page_activation"));
     // activation type radio
     $rad = new ilRadioGroupInputGUI($lng->txt("cont_activation"), "activation");
     $rad_op1 = new ilRadioOption($lng->txt("cont_activated"), "activated");
     $rad->addOption($rad_op1);
     $rad_op2 = new ilRadioOption($lng->txt("cont_deactivated"), "deactivated");
     $rad->addOption($rad_op2);
     $rad_op3 = new ilRadioOption($lng->txt("cont_scheduled_activation"), "scheduled");
     $dt_prop = new ilDateTimeInputGUI($lng->txt("cont_start"), "start");
     $dt_prop->setShowTime(true);
     $rad_op3->addSubItem($dt_prop);
     $dt_prop2 = new ilDateTimeInputGUI($lng->txt("cont_end"), "end");
     $dt_prop2->setShowTime(true);
     $rad_op3->addSubItem($dt_prop2);
     // show activation information
     $cb = new ilCheckboxInputGUI($this->lng->txt("cont_show_activation_info"), "show_activation_info");
     $cb->setInfo($this->lng->txt("cont_show_activation_info_info"));
     $rad_op3->addSubItem($cb);
     $rad->addOption($rad_op3);
     $this->form->addCommandButton("saveActivation", $lng->txt("save"));
     $this->form->addItem($rad);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:31,代码来源:class.ilPageObjectGUI.php


示例13: getFormElement


//.........这里部分代码省略.........
         case 'lom_interactivity':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_interactivity']);
             $select->setOptions(ilMDUtilSelect::_getInteractivityTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_resource':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_resource']);
             $select->setOptions(ilMDUtilSelect::_getLearningResourceTypeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_level':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_start'], 'query[' . 'lom_level_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getInteractivityLevelSelect($a_query['lom_level_end'], 'query[' . 'lom_level_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_density':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_start'], 'query[' . 'lom_density_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getSemanticDensitySelect($a_query['lom_density_end'], 'query[' . 'lom_density_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
         case 'lom_user_role':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_user_role']);
             $select->setOptions(ilMDUtilSelect::_getIntendedEndUserRoleSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_context':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_context']);
             $select->setOptions(ilMDUtilSelect::_getContextSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_difficulty':
             $range = new ilCustomInputGUI($this->active_fields[$a_field_name]);
             $html = $this->getRangeSelect($this->lng->txt('from'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_start'], 'query[' . 'lom_difficulty_start' . ']', array(0 => $this->lng->txt('search_any'))), $this->lng->txt('until'), ilMDUtilSelect::_getDifficultySelect($a_query['lom_difficulty_end'], 'query[' . 'lom_difficulty_end' . ']', array(0 => $this->lng->txt('search_any'))));
             $range->setHTML($html);
             return $range;
             // Rights
         // Rights
         case 'lom_costs':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_costs']);
             $select->setOptions(ilMDUtilSelect::_getCostsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_copyright':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_copyright']);
             $select->setOptions(ilMDUtilSelect::_getCopyrightAndOtherRestrictionsSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
             // Classification
         // Classification
         case 'lom_purpose':
             $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $select->setValue($a_query['lom_purpose']);
             $select->setOptions(ilMDUtilSelect::_getPurposeSelect('', $a_field_name, array(0 => $this->lng->txt('search_any')), true));
             return $select;
         case 'lom_taxon':
             $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
             $text->setSubmitFormOnEnter(true);
             $text->setValue($a_query['lom_taxon']);
             $text->setSize(30);
             $text->setMaxLength(255);
             return $text;
         default:
             if (substr($a_field_name, 0, 3) != 'adv') {
                 break;
             }
             // Advanced meta data
             $field_id = substr($a_field_name, 4);
             include_once './Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
             $field = ilAdvancedMDFieldDefinition::_getInstanceByFieldId($field_id);
             switch ($field->getFieldType()) {
                 case ilAdvancedMDFieldDefinition::TYPE_TEXT:
                     $text = new ilTextInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $text->setSubmitFormOnEnter(true);
                     $text->setValue($a_query[$a_field_name]);
                     $text->setSize(30);
                     $text->setMaxLength(255);
                     return $text;
                 case ilAdvancedMDFieldDefinition::TYPE_SELECT:
                     $select = new ilSelectInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $select->setValue($a_query[$a_field_name]);
                     $select->setOptions($field->getFieldValuesForSearch());
                     return $select;
                 case ilAdvancedMDFieldDefinition::TYPE_DATE:
                 case ilAdvancedMDFieldDefinition::TYPE_DATETIME:
                     $check = new ilCheckboxInputGUI($this->active_fields[$a_field_name], $a_post_name);
                     $check->setValue(1);
                     $check->setChecked($a_query[$a_field_name]);
                     $time = new ilDateTimeInputGUI($this->lng->txt('from'), $a_field_name . '_start');
                     $time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
                     $time->setDate(new ilDateTime(mktime(8, 0, 0, date('m'), date('d'), date('Y')), IL_CAL_UNIX));
                     $check->addSubItem($time);
                     $time = new ilDateTimeInputGUI($this->lng->txt('until'), $a_field_name . '_end');
                     $time->setShowTime($field->getFieldType() != ilAdvancedMDFieldDefinition::TYPE_DATE);
                     $time->setDate(new ilDateTime(mktime(16, 0, 0, date('m'), date('d'), date('Y')), IL_CAL_UNIX));
                     $check->addSubItem($time);
                     return $check;
             }
     }
     return null;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:101,代码来源:class.ilLuceneAdvancedSearchFields.php


示例14: showECSStart

 /**
  * Show special form for ecs start
  * 
  * @access private
  * @param object ilAdvMDFieldDefinition
  */
 private function showECSStart($def)
 {
     global $ilUser;
     $this->lng->loadLanguageModule('ecs');
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDValue.php';
     $value_start = ilAdvancedMDValue::_getInstance($this->obj_id, $def->getFieldId());
     $unixtime = $value_start->getValue() ? $value_start->getValue() : mktime(8, 0, 0, date('m'), date('d'), date('Y'));
     $time = new ilDateTimeInputGUI($this->lng->txt('ecs_event_appointment'), 'md[' . $def->getFieldId() . ']');
     $time->setShowTime(true);
     $time->setDate(new ilDateTime($unixtime, IL_CAL_UNIX));
     $time->enableDateActivation($this->lng->txt('enabled'), 'md_activated[' . $def->getFieldId() . ']', $value_start->getValue() ? true : false);
     $time->setDisabled($value_start->isDisabled());
     $mapping = ilECSDataMappingSettings::_getInstance();
     if ($field_id = $mapping->getMappingByECSName('end')) {
         $value_end = ilAdvancedMDValue::_getInstance($this->obj_id, $field_id);
         list($hours, $minutes) = $this->parseDuration($value_start->getValue(), $value_end->getValue());
         $duration = new ilDurationInputGUI($this->lng->txt('ecs_duration'), 'ecs_duration');
         $duration->setHours($hours);
         $duration->setMinutes($minutes);
         #$duration->setInfo($this->lng->txt('ecs_duration_info'));
         $duration->setShowHours(true);
         $duration->setShowMinutes(true);
         $time->addSubItem($duration);
     }
     if ($field_id = $mapping->getMappingByECSName('cycle')) {
         $value = ilAdvancedMDValue::_getInstance($this->obj_id, $field_id);
         $cycle_def = ilAdvancedMDFieldDefinition::getInstance($field_id);
         switch ($cycle_def->getFieldType()) {
             case ilAdvancedMDFieldDefinition::TYPE_TEXT:
                 $text = new ilTextInputGUI($cycle_def->getTitle(), 'md[' . $cycle_def->getFieldId() . ']');
                 $text->setValue($value->getValue());
                 $text->setSize(20);
                 $text->setMaxLength(512);
                 $text->setDisabled($value->isDisabled());
                 $time->addSubItem($text);
                 break;
             case ilAdvancedMDFieldDefinition::TYPE_SELECT:
                 $select = new ilSelectInputGUI($cycle_def->getTitle(), 'md[' . $cycle_def->getFieldId() . ']');
                 $select->setOptions($cycle_def->getFieldValuesForSelect());
                 $select->setValue($value->getValue());
                 $select->setDisabled($value->isDisabled());
                 $time->addSubItem($select);
                 break;
         }
     }
     if ($field_id = $mapping->getMappingByECSName('room')) {
         $value = ilAdvancedMDValue::_getInstance($this->obj_id, $field_id);
         $room_def = ilAdvancedMDFieldDefinition::getInstance($field_id);
         switch ($room_def->getFieldType()) {
             case ilAdvancedMDFieldDefinition::TYPE_TEXT:
                 $text = new ilTextInputGUI($room_def->getTitle(), 'md[' . $room_def->getFieldId() . ']');
                 $text->setValue($value->getValue());
                 $text->setSize(20);
                 $text->setMaxLength(512);
                 $text->setDisabled($value->isDisabled());
                 $time->addSubItem($text);
                 break;
             case ilAdvancedMDFieldDefinition::TYPE_SELECT:
                 $select = new ilSelectInputGUI($room_def->getTitle(), 'md[' . $room_def->getFieldId() . ']');
                 $select->setOptions($cycle_def->getFieldValuesForSelect());
                 $select->setValue($value->getValue());
                 $select->setDisabled($value->isDisabled());
                 $time->addSubItem($select);
                 break;
         }
     }
     $this->form->addItem($time);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:74,代码来源:class.ilAdvancedMDRecordGUI.php


示例15: addFilterItemByMetaType

 /**
  * Add filter by standard type
  * 
  * @param	string	$id
  * @param	int		$type
  * @param	bool	$a_optional
  * @param	string	$caption
  * @return	object
  */
 function addFilterItemByMetaType($id, $type = self::FILTER_TEXT, $a_optional = false, $caption = NULL)
 {
     global $lng;
     if (!$caption) {
         $caption = $lng->txt($id);
     }
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     switch ($type) {
         case self::FILTER_SELECT:
             include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
             $item = new ilSelectInputGUI($caption, $id);
             break;
         case self::FILTER_DATE:
             include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
             $item = new ilDateTimeInputGUI($caption, $id);
             $item->setMode(ilDateTimeInputGUI::MODE_INPUT);
             break;
         case self::FILTER_TEXT:
             include_once "./Services/Form/classes/class.ilTextInputGUI.php";
             $item = new ilTextInputGUI($caption, $id);
             $item->setMaxLength(64);
             $item->setSize(20);
             // $item->setSubmitFormOnEnter(true);
             break;
         case self::FILTER_LANGUAGE:
             $lng->loadLanguageModule("meta");
             include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
             $item = new ilSelectInputGUI($caption, $id);
             $options = array("" => $lng->txt("trac_all"));
             foreach ($lng->getInstalledLanguages() as $lang_key) {
                 $options[$lang_key] = $lng->txt("meta_l_" . $lang_key);
             }
             $item->setOptions($options);
             break;
         case self::FILTER_NUMBER_RANGE:
             include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
             include_once "./Services/Form/classes/class.ilNumberInputGUI.php";
             $item = new ilCombinationInputGUI($caption, $id);
             $combi_item = new ilNumberInputGUI("", $id . "_from");
             $item->addCombinationItem("from", $combi_item, $lng->txt("from"));
             $combi_item = new ilNumberInputGUI("", $id . "_to");
             $item->addCombinationItem("to", $combi_item, $lng->txt("to"));
             $item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
             $item->setMaxLength(7);
             $item->setSize(20);
             break;
         case self::FILTER_DATE_RANGE:
             include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
             include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
             $item = new ilCombinationInputGUI($caption, $id);
             $combi_item = new ilDateTimeInputGUI("", $id . "_from");
             $item->addCombinationItem("from", $combi_item, $lng->txt("from"));
             $combi_item = new ilDateTimeInputGUI("", $id . "_to");
             $item->addCombinationItem("to", $combi_item, $lng->txt("to"));
             $item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
             $item->setMode(ilDateTimeInputGUI::MODE_INPUT);
             break;
         case self::FILTER_DATETIME_RANGE:
             include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
             include_once "./Services/Form/classes/class.ilDateTimeInputGUI.php";
             $item = new ilCombinationInputGUI($caption, $id);
             $combi_item = new ilDateTimeInputGUI("", $id . "_from");
             $combi_item->setShowTime(true);
             $item->addCombinationItem("from", $combi_item, $lng->txt("from"));
             $combi_item = new ilDateTimeInputGUI("", $id . "_to");
             $combi_item->setShowTime(true);
             $item->addCombinationItem("to", $combi_item, $lng->txt("to"));
             $item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
             $item->setMode(ilDateTimeInputGUI::MODE_INPUT);
             break;
         case self::FILTER_DURATION_RANGE:
             $lng->loadLanguageModule("form");
             include_once "./Services/Form/classes/class.ilCombinationInputGUI.php";
             include_once "./Services/Form/classes/class.ilDurationInputGUI.php";
             $item = new ilCombinationInputGUI($caption, $id);
             $combi_item = new ilDurationInputGUI("", $id . "_from");
             $combi_item->setShowMonths(false);
             $combi_item->setShowDays(true);
             $combi_item->setShowSeconds(true);
             $item->addCombinationItem("from", $combi_item, $lng->txt("from"));
             $combi_item = new ilDurationInputGUI("", $id . "_to");
             $combi_item->setShowMonths(false);
             $combi_item->setShowDays(true);
             $combi_item->setShowSeconds(true);
             $item->addCombinationItem("to", $combi_item, $lng->txt("to"));
             $item->setComparisonMode(ilCombinationInputGUI::COMPARISON_ASCENDING);
             break;
         default:
             return false;
     }
     $this->addFilterItem($item, $a_optional);
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilTable2GUI.php


示例16: initAssignmentForm

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP ilFileInputGUI类代码示例发布时间:2022-05-23
下一篇:
PHP ilDateTime类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap