MAX_FILE_SIZE hidden field must be before the file input according to the PHP docs
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 May 2009 06:31:47 +0000 (06:31 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 14 May 2009 06:31:47 +0000 (06:31 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13697 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default/compose_attachments.tpl

index 86c2784a5f871a7917238216a6c490e0bedd1e28..f36d99be215d36b4d079b42c94957ee871be7ae6 100644 (file)
@@ -28,16 +28,18 @@ extract($t);
    <?php echo _("New attachment");?>:
   </td>
   <td class="fieldValue">
+   <?php
+    if($max_file_size != -1) {
+        echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . $max_file_size . '" />';
+    }
+   ?>
    <input type="file" name="attachfile" size="48" <?php if ($accesskey_compose_attach_browse != 'NONE') echo 'accesskey="' . $accesskey_compose_attach_browse . '" '; ?>/>
    &nbsp;
    <input type="submit" name="attach" <?php if ($accesskey_compose_attach != 'NONE') echo 'accesskey="' . $accesskey_compose_attach . '" '; ?>value="<?php echo _("Attach"); ?>" />
    &nbsp;
    <?php
     if($max_file_size != -1) {
-        ?>
-   <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_file_size; ?>" />
-   (<?php echo _("Max."); ?> <?php echo humanReadableSize($max_file_size); ?>)
-        <?php
+       echo '(' . _("Max.") . ' ' . humanReadableSize($max_file_size) . ')';
     }
    ?>
   </td>