1 <form method="post" action="import.php" enctype="multipart/form-data">
2 <table border="0" cellpadding="3" cellspacing="3" width="100%">
4 <td align="right" style="width:30%;vertical-align:top"><?php print_string("filetoimport","glossary") ?>:
7 print_string("maxsize", "", display_size(get_max_upload_file_size($CFG->maxbytes, $course->maxbytes)));
9 echo $OUTPUT->help_icon('filetoimport', 'glossary');
12 <td style="width:70%">
14 require_once($CFG->dirroot.'/lib/uploadlib.php');
15 $options = new stdclass;
16 $options->maxbytes = get_max_upload_file_size($CFG->maxbytes, $course->maxbytes);
17 $options->itemid = file_get_unused_draft_itemid();
18 $options->accepted_types = array('markup');
19 $options->return_types = FILE_INTERNAL;
20 $options->context = $PAGE->context;
22 $options->filename = $file->get_filename();
23 $options->filepath = '/';
25 $fp = new file_picker($options);
26 echo $OUTPUT->render($fp);
27 echo '<input type="hidden" name="file" id="id_file" value="'.$options->itemid.'" />';
28 $module = array('name'=>'form_filepicker', 'fullpath'=>'/lib/form/filepicker.js', 'requires'=>array('core_filepicker'));
29 $PAGE->requires->js_init_call('M.form_filepicker.init', array($fp->options), true, $module);
30 // upload_print_form_fragment(1,array('file'),null,false,null,0,0);
35 <td align="right" style="width:25%"><?php print_string("destination","glossary") ?>: <?php echo $OUTPUT->help_icon('destination', 'glossary') ?></td>
36 <td style="width:25%">
37 <select size="1" name="dest">
38 <option selected="selected" value="current"><?php print_string("currentglossary","glossary") ?></option>
39 <option value="new"><?php print_string("newglossary","glossary") ?></option>
45 <td style="width:25%" align="right"><?php print_string("importcategories","glossary") ?>:</td>
46 <td style="width:25%"><input type="checkbox" name="catsincl" value="1" alt="<?php print_string("importcategories","glossary") ?>" /></td>
49 <div class="mdl-align">
50 <input type="hidden" name="id" value="<?php p($id) ?>" />
51 <input type="hidden" name="sesskey" value="<?php echo sesskey() ?>" />
52 <input type="hidden" name="step" value="1" />
53 <input type="submit" value="<?php print_string("savechanges") ?>" />
54 <input type="reset" value="<?php print_string("revert") ?>" />