mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 10:26:40 +02:00
MDL-59544 forms: Implicit validation of the filemanager and filepicker
The patch adds an extra validation step against accepted file types. Even if the repository checks are bypassed (as illustrated in the Behat), the invalid file is still caught by the element's validation rules. It turns out there is no way to test the filepicker element easily via Behat. Additionally, it provides the renaming features only with disabled javascript. So the Behat tests are provided for the filemanager only. AMOS BEGIN CPY [err_wrongfileextension,mod_workshop],[err_wrongfileextension,core_form] AMOS END
This commit is contained in:
parent
16a68a2f76
commit
1661204a6c
5 changed files with 97 additions and 1 deletions
|
@ -41,6 +41,7 @@ $string['err_nopunctuation'] = 'You must enter no punctuation characters here.';
|
|||
$string['err_numeric'] = 'You must enter a number here.';
|
||||
$string['err_rangelength'] = 'You must enter between {$a->format[0]} and {$a->format[1]} characters here.';
|
||||
$string['err_required'] = 'You must supply a value here.';
|
||||
$string['err_wrongfileextension'] = 'Some files ({$a->wrongfiles}) cannot be uploaded. Only file types {$a->whitelist} are allowed.';
|
||||
$string['filetypesany'] = 'All file types';
|
||||
$string['filetypesnotall'] = 'It is not allowed to select \'All file types\' here';
|
||||
$string['filetypesnotwhitelisted'] = 'These file types are not allowed here: {$a}';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue