From 17719259e750e446d6f0badc7046bd98d39ab7c7 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Fri, 8 Nov 2013 19:39:31 +0000
Subject: [PATCH] Fix several presentation issues for attachment widget

---
 include/class.forms.php           | 7 +++++--
 include/staff/ticket-view.inc.php | 2 +-
 js/jquery.multifile.js            | 6 +++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/include/class.forms.php b/include/class.forms.php
index 9b50b9440..3c583b56b 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -1068,10 +1068,13 @@ class ThreadEntryWidget extends Widget {
             || ($cfg->allowAttachmentsOnlogin()
                 && ($thisclient && $thisclient->isValid()))) { ?>
         <hr/>
-        <div><strong>Attachments:</strong></div>
-        <div class="uploads"></div><br>
+        <div><strong style="padding-right:1em;vertical-align:top">Attachments: </strong>
+        <div style="display:inline-block">
+        <div class="uploads" style="display:block"></div>
         <input type="file" class="multifile" name="attachments[]" id="attachments" size="30" value="" />
+        </div>
         <font class="error">&nbsp;<?php echo $errors['attachments']; ?></font>
+        <hr/>
         <?php
         }
     }
diff --git a/include/staff/ticket-view.inc.php b/include/staff/ticket-view.inc.php
index c11b60668..1eedde09f 100644
--- a/include/staff/ticket-view.inc.php
+++ b/include/staff/ticket-view.inc.php
@@ -504,7 +504,7 @@ if(!$cfg->showNotesInline()) { ?>
             <?php
             if($cfg->allowAttachments()) { ?>
             <tr>
-                <td width="120">
+                <td width="120" style="vertical-align:top">
                     <label for="attachment">Attachments:</label>
                 </td>
                 <td id="reply_form_attachments" class="attachments">
diff --git a/js/jquery.multifile.js b/js/jquery.multifile.js
index 0c0dd4a1c..a1ae5a02f 100644
--- a/js/jquery.multifile.js
+++ b/js/jquery.multifile.js
@@ -114,16 +114,16 @@
             }
 
             $(this).bind('change.multifile', addInput);
-  
+
         });
   };
 
   $.fn.multifile.inputTemplate = function(file) {
-    return $('<label style="padding-right:5px;"><input type="checkbox" name="uploads[]" value="' + file.name + '" checked="checked"> ' + file.name + '</label>');
+    return $('<label style="padding-right:5px;"><input type="checkbox" name="uploads[]" value="' + file.name + '" checked="checked"> ' + file.name + '</label><br/>');
   };
 
   $.fn.multifile.checkFileTypes = function(file, allowedFileTypes) {
-     
+
       //Wildcard.
       if(allowedFileTypes[0]=='.*')
           return true;
-- 
GitLab