mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +00:00
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:
@@ -55,7 +55,7 @@ $(function () {
|
|||||||
$('#fileupload').fileupload({
|
$('#fileupload').fileupload({
|
||||||
dataType: 'html',
|
dataType: 'html',
|
||||||
add: function(e, data) {
|
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(' | ') %}
|
{% 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') }}");
|
alert("{{ 'Invalid file type, only (%supported_file_types%) file formats are supported' | trans({'%supported_file_types%' : supported_file_types}) | e('js') }}");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user