From 0be877723392a56557e7785fbce50651570e183b Mon Sep 17 00:00:00 2001
From: Peter Rotich <peter@enhancesoft.com>
Date: Wed, 27 Nov 2013 00:57:11 +0000
Subject: [PATCH] Fixes: usability and style issues

---
 include/staff/templates/user-lookup.tmpl.php | 2 +-
 include/staff/ticket-edit.inc.php            | 4 ++--
 include/staff/ticket-open.inc.php            | 4 ++--
 scp/css/scp.css                              | 3 ++-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/include/staff/templates/user-lookup.tmpl.php b/include/staff/templates/user-lookup.tmpl.php
index 3e56def47..de8dedb4e 100644
--- a/include/staff/templates/user-lookup.tmpl.php
+++ b/include/staff/templates/user-lookup.tmpl.php
@@ -34,7 +34,7 @@ if ($info['error']) {
     <table width="100%">
     <?php
         if(!$form) $form = UserForm::getInstance();
-        $form->render(true, 'New User Information'); ?>
+        $form->render(true, 'Create New User'); ?>
     </table>
     <hr>
     <p class="full-width">
diff --git a/include/staff/ticket-edit.inc.php b/include/staff/ticket-edit.inc.php
index fa4b40690..2ce26ddb5 100644
--- a/include/staff/ticket-edit.inc.php
+++ b/include/staff/ticket-edit.inc.php
@@ -32,8 +32,8 @@ if ($_POST)
                     $.userLookup('ajax.php/tickets/<?php echo $ticket->getId(); ?>/change-user',
                             function(user) {
                                 $('input#user_id').val(user.id);
-                                $('#user_name').html(user.name);
-                                $('#user_email').html('&lt;'+user.email+'&gt;');
+                                $('#client-name').html(user.name);
+                                $('#client-email').html('&lt;'+user.email+'&gt;');
                     });
                     return false;
                 "><i class="icon-edit"></i> Change</a>
diff --git a/include/staff/ticket-open.inc.php b/include/staff/ticket-open.inc.php
index 6e7a76a96..c4f6d2746 100644
--- a/include/staff/ticket-open.inc.php
+++ b/include/staff/ticket-open.inc.php
@@ -26,11 +26,12 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
         if ($user) { ?>
         <tr><td>Client:</td><td>
             <div id="client-info">
+                <input type="hidden" name="uid" id="uid" value="<?php echo $user->getId(); ?>" />
                 <span id="client-name"><?php echo $user->getName(); ?></span>
                 <span id="client-email">&lt;<?php echo $user->getEmail(); ?>&gt;</span>
                 <a class="action-button" style="float:none;overflow:inherit" href="#"
                     onclick="javascript:
-                        $.userLookup('ajax.php/users/select/<?php echo $user->getId(); ?>',
+                        $.userLookup('ajax.php/users/select/'+$('input#uid').val(),
                             function(user) {
                                 $('input#uid').val(user.id);
                                 $('#client-name').html(user.name);
@@ -38,7 +39,6 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                         });
                         return false;
                 "><i class="icon-edit"></i> Change</a>
-                <input type="hidden" name="uid" id="uid" value="<?php echo $user->getId(); ?>" />
             </div>
         </td></tr>
         <?php
diff --git a/scp/css/scp.css b/scp/css/scp.css
index df51fade9..1ed00d4db 100644
--- a/scp/css/scp.css
+++ b/scp/css/scp.css
@@ -1264,7 +1264,7 @@ time {
     box-shadow: 0 5px 60px #001;
     border-radius: 5px;
     max-height: 72%;
-    overflow-y: scroll;
+    overflow-y: auto;
 }
 
 .redactor_air {
@@ -1402,6 +1402,7 @@ time {
 }
 
 .dialog input[type=submit]:hover, .dialog input[type=submit]:active,
+.dialog input[type=button]:hover, .dialog input[type=button]:active,
 .dialog input[type=reset]:hover, .dialog input[type=reset]:active {
     background-position:bottom left;
 }
-- 
GitLab