762853f4 |
1 | <?php |
2 | /** |
3 | * compose_attachments.tpl |
4 | * |
5 | * Description |
6 | * |
7 | * The following variables are available in this template: |
8949acd6 |
8 | * $accesskey_compose_attach_browse - The access key to be used for the Browse button |
9 | * $accesskey_compose_attach - The access key to be used for the Attach button |
10 | * $accesskey_compose_delete_attach - The access key to be used for the Delete Attachments button |
762853f4 |
11 | * |
c4faef33 |
12 | * @copyright 1999-2020 The SquirrelMail Project Team |
762853f4 |
13 | * @license http://opensource.org/licenses/gpl-license.php GNU Public License |
14 | * @version $Id$ |
15 | * @package squirrelmail |
16 | * @subpackage templates |
17 | */ |
18 | |
762853f4 |
19 | /** extract template variables **/ |
20 | extract($t); |
21 | |
22 | /** Begin template **/ |
23 | ?> |
24 | <div class="compose"> |
ab0c4c3a |
25 | <table cellspacing="0" class="table1" id="attachment_table"> |
762853f4 |
26 | <tr class="header"> |
27 | <td class="fieldName" style="width: 1%; white-space: nowrap;"> |
a812d450 |
28 | <?php echo _("New attachment");?>: |
762853f4 |
29 | </td> |
30 | <td class="fieldValue"> |
2ecf9f40 |
31 | <?php |
32 | if($max_file_size != -1) { |
33 | echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . $max_file_size . '" />'; |
34 | } |
35 | ?> |
8949acd6 |
36 | <input type="file" name="attachfile" size="48" <?php if ($accesskey_compose_attach_browse != 'NONE') echo 'accesskey="' . $accesskey_compose_attach_browse . '" '; ?>/> |
762853f4 |
37 | |
8949acd6 |
38 | <input type="submit" name="attach" <?php if ($accesskey_compose_attach != 'NONE') echo 'accesskey="' . $accesskey_compose_attach . '" '; ?>value="<?php echo _("Attach"); ?>" /> |
762853f4 |
39 | |
40 | <?php |
41 | if($max_file_size != -1) { |
2ecf9f40 |
42 | echo '(' . _("Max.") . ' ' . humanReadableSize($max_file_size) . ')'; |
762853f4 |
43 | } |
ab0c4c3a |
44 | if (!empty($plugin_output['add_attachment_notes'])) echo $plugin_output['add_attachment_notes']; |
762853f4 |
45 | ?> |
46 | </td> |
47 | </tr> |
48 | <?php |
ab0c4c3a |
49 | if (!empty($plugin_output['attachment_inputs'])) echo $plugin_output['attachment_inputs']; |
8949acd6 |
50 | $attachment_count = 1; |
762853f4 |
51 | foreach ($attachments as $attach) { |
52 | ?> |
53 | <tr class="attachment"> |
54 | <td class="fieldName" style="width: 1%"> |
71b1fa50 |
55 | <input type="checkbox" name="delete[]" id="delete<?php echo $attachment_count; ?>" accesskey="<?php echo ($attachment_count % 10); ?>" value="<?php echo $attach['Key']; ?>" /> |
762853f4 |
56 | </td> |
71b1fa50 |
57 | <td class="fieldValue"><label for="delete<?php echo $attachment_count; ?>"> |
3ab5b55b |
58 | <?php echo $attach['FileName']; ?> - <?php echo $attach['ContentType']; ?> (<?php echo humanReadableSize($attach['Size'], $upload_filesize_divisor); ?>) |
71b1fa50 |
59 | </label></td> |
762853f4 |
60 | </tr> |
61 | <?php |
8949acd6 |
62 | $attachment_count++; |
762853f4 |
63 | } |
64 | |
65 | if (count($attachments) > 0) { |
66 | ?> |
67 | <tr class="header"> |
68 | <td colspan="2"> |
8949acd6 |
69 | <input type="submit" name="do_delete" <?php if ($accesskey_compose_delete_attach != 'NONE') echo 'accesskey="' . $accesskey_compose_delete_attach . '" '; ?>value="<?php echo _("Delete Selected Attachments"); ?>" /> |
762853f4 |
70 | </td> |
71 | </tr> |
72 | <?php |
73 | } |
74 | ?> |
75 | </table> |
d281e128 |
76 | </div> |