Merge pull request #2605 from aynsix/PHRAS-1967-port-1951-import-from-file

PHRAS-1967 port to 4.1 Admin / Users / Import from file (csv or rtf)
This commit is contained in:
Nicolas Maillat
2018-05-23 20:04:14 +02:00
committed by GitHub

View File

@@ -55,7 +55,7 @@ $(function () {
$('#fileupload').fileupload({
dataType: 'html',
add: function(e, data) {
if( ! /(\.|\/)(csv|rtf)$/i.test(data.files[0].type)) {
if( ! /(\.|\/)(csv|rtf)$/i.test(data.files[0].name)) {
{% set supported_file_types = ['csv', 'rtf']|join(' | ') %}
alert("{{ 'Invalid file type, only (%supported_file_types%) file formats are supported' | trans({'%supported_file_types%' : supported_file_types}) | e('js') }}");