mirror of
https://github.com/moodle/moodle.git
synced 2025-03-21 08:00:37 +01:00
MDL-78688 admin: define accepted filetype for uploaded preset file.
This commit is contained in:
parent
f12e1b82a0
commit
ec92edec88
@ -42,8 +42,8 @@ class import_form extends moodleform {
|
||||
$mform->setType('name', PARAM_TEXT);
|
||||
|
||||
// File upload.
|
||||
$mform->addElement('filepicker', 'xmlfile',
|
||||
get_string('selectfile', 'tool_admin_presets'));
|
||||
$mform->addElement('filepicker', 'xmlfile', get_string('selectfile', 'tool_admin_presets'), null,
|
||||
['accepted_types' => ['.xml']]);
|
||||
$mform->addRule('xmlfile', null, 'required');
|
||||
|
||||
$this->add_action_buttons(true, get_string('import', 'tool_admin_presets'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user