From 70d622dc0e7b873ae4066cb422969135959e7d2b Mon Sep 17 00:00:00 2001 From: Mike Koch Date: Thu, 12 May 2016 21:44:06 -0400 Subject: [PATCH] Fix double file-submission --- inc/view_attachment_functions.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/view_attachment_functions.inc.php b/inc/view_attachment_functions.inc.php index 28e061ae..0156287f 100644 --- a/inc/view_attachment_functions.inc.php +++ b/inc/view_attachment_functions.inc.php @@ -215,12 +215,12 @@ function build_dropzone_markup($id = 'filedrop') {
'; for ($i = 1; $i <= $hesk_settings['attachments']['max_number']; $i++) { - $cls = ($i == 1 && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : ''; + $cls = ($i == 1 && isset($_SESSION['iserror']) && in_array('attachments', $_SESSION['iserror'])) ? ' class="isError" ' : ''; echo '
'; } echo '
-
+
' . $hesklang['add_files'] . '

'. $hesklang['ful'] . ''; } @@ -297,7 +297,7 @@ function display_dropzone_field($url, $id = 'filedrop') { dictCancelUploadConfirmation: ".json_encode($hesklang['attachment_confirm_cancel']).", dictRemoveFile: ".json_encode($hesklang['attachment_remove']).", previewTemplate: $('#previews').html(), - clickable: '.fileinput-button' + clickable: '.filedropbutton-".$id."' }; ";