本文整理汇总了PHP中ilFileInputGUI::setALlowDeletion方法的典型用法代码示例。如果您正苦于以下问题:PHP ilFileInputGUI::setALlowDeletion方法的具体用法?PHP ilFileInputGUI::setALlowDeletion怎么用?PHP ilFileInputGUI::setALlowDeletion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilFileInputGUI
的用法示例。
在下文中一共展示了ilFileInputGUI::setALlowDeletion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initAssignmentForm
//.........这里部分代码省略.........
$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()) {
$peer_prsl->setDisabled(true);
}
// global feedback
$fb = new ilCheckboxInputGUI($lng->txt("exc_global_feedback_file"), "fb");
$this->form->addItem($fb);
$fb_file = new ilFileInputGUI($lng->txt("file"), "fb_file");
// $fb_file->setRequired(true);
$fb_file->setALlowDeletion(true);
$fb->addSubItem($fb_file);
$fb_date = new ilRadioGroupInputGUI($lng->txt("exc_global_feedback_file_date"), "fb_date");
$fb_date->setRequired(true);
$fb_date->addOption(new ilRadioOption($lng->txt("exc_global_feedback_file_date_deadline"), ilExAssignment::FEEDBACK_DATE_DEADLINE));
$fb_date->addOption(new ilRadioOption($lng->txt("exc_global_feedback_file_date_upload"), ilExAssignment::FEEDBACK_DATE_SUBMISSION));
$fb->addSubItem($fb_date);
$fb_cron = new ilCheckboxInputGUI($lng->txt("exc_global_feedback_file_cron"), "fb_cron");
$fb_cron->setInfo($lng->txt("exc_global_feedback_file_cron_info"));
$fb->addSubItem($fb_cron);
// save and cancel commands
if ($a_mode == "create") {
$this->form->addCommandButton("saveAssignment", $lng->txt("save"));
$this->form->addCommandButton("listAssignments", $lng->txt("cancel"));
} else {
$this->form->addCommandButton("updateAssignment", $lng->txt("save"));
$this->form->addCommandButton("listAssignments", $lng->txt("cancel"));
}
}
示例2: initImportForm
/**
* Create import form
*/
protected function initImportForm()
{
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt('cal_import_tbl'));
$form->setFormAction($this->ctrl->getFormAction($this));
$form->addCommandButton('uploadAppointments', $this->lng->txt('import'));
$ics = new ilFileInputGUI($this->lng->txt('cal_import_file'), 'file');
$ics->setALlowDeletion(false);
$ics->setSuffixes(array('ics'));
$ics->setInfo($this->lng->txt('cal_import_file_info'));
$form->addItem($ics);
return $form;
}
示例3: initForm
/**
* Build property form
* @param string $a_mode
* @param int $id
* @return object
*/
function initForm($a_mode = "create", $id = NULL)
{
global $lng, $ilCtrl, $ilObjDataCache;
include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
$form_gui = new ilPropertyFormGUI();
$title = new ilTextInputGUI($lng->txt("title"), "title");
$title->setRequired(true);
$title->setSize(40);
$title->setMaxLength(120);
$form_gui->addItem($title);
$desc = new ilTextAreaInputGUI($lng->txt("description"), "desc");
$desc->setCols(70);
$desc->setRows(15);
$form_gui->addItem($desc);
$file = new ilFileInputGUI($lng->txt("book_additional_info_file"), "file");
$file->setALlowDeletion(true);
$form_gui->addItem($file);
$nr = new ilNumberInputGUI($lng->txt("booking_nr_of_items"), "items");
$nr->setRequired(true);
$nr->setSize(3);
$nr->setMaxLength(3);
$form_gui->addItem($nr);
if ($this->pool_has_schedule) {
$options = array();
include_once 'Modules/BookingManager/classes/class.ilBookingSchedule.php';
foreach (ilBookingSchedule::getList($ilObjDataCache->lookupObjId($this->ref_id)) as $schedule) {
$options[$schedule["booking_schedule_id"]] = $schedule["title"];
}
$schedule = new ilSelectInputGUI($lng->txt("book_schedule"), "schedule");
$schedule->setRequired(true);
$schedule->setOptions($options);
$form_gui->addItem($schedule);
}
$post = new ilFormSectionHeaderGUI();
$post->setTitle($lng->txt("book_post_booking_information"));
$form_gui->addItem($post);
$pdesc = new ilTextAreaInputGUI($lng->txt("book_post_booking_text"), "post_text");
$pdesc->setCols(70);
$pdesc->setRows(15);
$form_gui->addItem($pdesc);
$pfile = new ilFileInputGUI($lng->txt("book_post_booking_file"), "post_file");
$pfile->setALlowDeletion(true);
$form_gui->addItem($pfile);
if ($a_mode == "edit") {
$form_gui->setTitle($lng->txt("book_edit_object"));
$item = new ilHiddenInputGUI('object_id');
$item->setValue($id);
$form_gui->addItem($item);
include_once 'Modules/BookingManager/classes/class.ilBookingObject.php';
$obj = new ilBookingObject($id);
$title->setValue($obj->getTitle());
$desc->setValue($obj->getDescription());
$nr->setValue($obj->getNrOfItems());
$pdesc->setValue($obj->getPostText());
$file->setValue($obj->getFile());
$pfile->setValue($obj->getPostFile());
if (isset($schedule)) {
$schedule->setValue($obj->getScheduleId());
}
$form_gui->addCommandButton("update", $lng->txt("save"));
} else {
$form_gui->setTitle($lng->txt("book_add_object"));
$form_gui->addCommandButton("save", $lng->txt("save"));
$form_gui->addCommandButton("render", $lng->txt("cancel"));
}
$form_gui->setFormAction($ilCtrl->getFormAction($this));
return $form_gui;
}
示例4: createFileInputFormItem
/**
* Creates an input field for the davinci text file upload
*
* @return \ilFileInputGUI file input form item
*/
protected function createFileInputFormItem()
{
$file = new ilFileInputGUI($this->lng->txt("rep_robj_xrs_daVinci_import_file"), "upload_file");
$file->setSize(50);
$file->setRequired(true);
$file->setALlowDeletion(true);
$file->setSuffixes(array('txt'));
return $file;
}
示例5: createFileInputFormItem
/**
* Creates an input field for floor plans that should be uploaded.
*
* @return ilFileInputGUI file input form item
*/
protected function createFileInputFormItem()
{
$file = new ilFileInputGUI($this->lng->txt("rep_robj_xrs_room_floor_plans"), "upload_file");
$file->setSize(50);
$file->setRequired(true);
$file->setALlowDeletion(true);
$file->setInfo($this->lng->txt("rep_robj_xrs_floor_plans_filetypes") . " .bmp, .jpg, .jpeg, .png, .gif");
return $file;
}