diff --git a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee index 66220fa66..207fd6465 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_form.js.coffee @@ -664,23 +664,25 @@ class App.ControllerForm extends App.Controller # add file uploader u = => - @el.find('#' + fileUploaderId ).fineUploader( - request: - endpoint: App.Config.get('api_path') + '/ticket_attachment_new' - params: - form_id: @form_id - text: - uploadButton: '' - template: '
' + - '
{dragZoneText}
' + - '
{uploadButtonText}
' + - '' + - '
', - classes: - success: '' - fail: '' - debug: false - ) + # only add upload item if html element exists + if @el.find('#' + fileUploaderId )[0] + @el.find('#' + fileUploaderId ).fineUploader( + request: + endpoint: App.Config.get('api_path') + '/ticket_attachment_new' + params: + form_id: @form_id + text: + uploadButton: '' + template: '
' + + '
{dragZoneText}
' + + '
{uploadButtonText}
' + + '' + + '
', + classes: + success: '' + fail: '' + debug: false + ) App.Delay.set( u, 100, undefined, 'form_upload' ) # article