mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 16:13:28 +02:00
MDL-80498 group: Added required rule for filepicker field
This commit is contained in:
parent
580c009cac
commit
bfc9f17686
1 changed files with 1 additions and 0 deletions
|
@ -53,6 +53,7 @@ class groups_import_form extends moodleform {
|
||||||
$filepickeroptions['filetypes'] = '*';
|
$filepickeroptions['filetypes'] = '*';
|
||||||
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
|
$filepickeroptions['maxbytes'] = get_max_upload_file_size();
|
||||||
$mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
|
$mform->addElement('filepicker', 'userfile', get_string('import'), null, $filepickeroptions);
|
||||||
|
$mform->addRule('userfile', null, 'required');
|
||||||
|
|
||||||
$mform->addElement('hidden', 'id');
|
$mform->addElement('hidden', 'id');
|
||||||
$mform->setType('id', PARAM_INT);
|
$mform->setType('id', PARAM_INT);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue