summaryrefslogtreecommitdiff
path: root/program/steps/mail/upload.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail/upload.inc')
-rw-r--r--program/steps/mail/upload.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/program/steps/mail/upload.inc b/program/steps/mail/upload.inc
index 4cd929d0d..7fe7d3dcc 100644
--- a/program/steps/mail/upload.inc
+++ b/program/steps/mail/upload.inc
@@ -45,7 +45,9 @@ foreach ($_FILES['_attachments']['tmp_name'] as $i => $filepath)
'mimetype' => $_FILES['_attachments']['type'][$i],
'path' => $tmpfname);
- $response .= sprintf("parent.%s.add2attachment_list('%s');\n", $JS_OBJECT_NAME, $_FILES['_attachments']['name'][$i]);
+ $button = sprintf('<img src="%s/images/icons/remove-attachment.png" alt="%s" border="0" style="padding-right:2px;vertical-align:middle">', $CONFIG['skin_path'], rcube_label('delete'));
+ $content = sprintf('<a href="#" onclick="%s.command(\\\'remove-attachment\\\',\\\'%s\\\')" title="%s">%s</a>%s',$JS_OBJECT_NAME, $_FILES['_attachments']['name'][$i], rcube_label('deletefolder'), $button, $_FILES['_attachments']['name'][$i]);
+ $response .= sprintf('parent.%s.add2attachment_list(\'%s\',\'%s\');',$JS_OBJECT_NAME, $_FILES['_attachments']['name'][$i], $content);
}
}
@@ -64,4 +66,4 @@ parent.$JS_OBJECT_NAME.show_attachment_form(false);
EOF;
exit;
-?> \ No newline at end of file
+?>