@@ -4,7 +4,7 @@ import {clippie} from 'clippie';
4
4
import { showTemporaryTooltip } from '../modules/tippy.js' ;
5
5
import { GET , POST } from '../modules/fetch.js' ;
6
6
import { showErrorToast } from '../modules/toast.js' ;
7
- import { createElementFromHTML , createElementFromObject } from '../utils/dom.js' ;
7
+ import { createElementFromHTML , createElement } from '../utils/dom.js' ;
8
8
9
9
const { csrfToken, i18n} = window . config ;
10
10
@@ -69,7 +69,7 @@ export async function initDropzone(dropzoneEl) {
69
69
dzInst . on ( 'success' , ( file , data ) => {
70
70
file . uuid = data . uuid ;
71
71
fileUuidDict [ file . uuid ] = { submitted : false } ;
72
- const input = createElementFromObject ( 'input' , { name : 'files' , type : 'hidden' , id : `dropzone-file-${ data . uuid } ` , value : data . uuid } ) ;
72
+ const input = createElement ( 'input' , { name : 'files' , type : 'hidden' , id : `dropzone-file-${ data . uuid } ` , value : data . uuid } ) ;
73
73
dropzoneEl . querySelector ( '.files' ) . append ( input ) ;
74
74
addCopyLink ( file ) ;
75
75
} ) ;
@@ -107,7 +107,7 @@ export async function initDropzone(dropzoneEl) {
107
107
dzInst . emit ( 'complete' , attachment ) ;
108
108
addCopyLink ( attachment ) ;
109
109
fileUuidDict [ attachment . uuid ] = { submitted : true } ;
110
- const input = createElementFromObject ( 'input' , { name : 'files' , type : 'hidden' , id : `dropzone-file-${ attachment . uuid } ` , value : attachment . uuid } ) ;
110
+ const input = createElement ( 'input' , { name : 'files' , type : 'hidden' , id : `dropzone-file-${ attachment . uuid } ` , value : attachment . uuid } ) ;
111
111
dropzoneEl . querySelector ( '.files' ) . append ( input ) ;
112
112
}
113
113
if ( ! dropzoneEl . querySelector ( '.dz-preview' ) ) {
0 commit comments