I just suggest to increase the dialog width and height to avoid the scroll (in the first view) and keep "Console Password" in one line

On 08/14/2014 06:01 AM, Simon Jin wrote:
    After set the password, only the one knows the password can access
    the vm graphic.

Signed-off-by: Simon Jin <simonjin@linux.vnet.ibm.com>
Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
---
 ui/css/theme-default/guest-edit.css | 10 +++++-----
 ui/js/src/kimchi.guest_edit_main.js |  4 ++++
 ui/pages/guest-edit.html.tmpl       | 13 +++++++++++++
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/ui/css/theme-default/guest-edit.css b/ui/css/theme-default/guest-edit.css
index 74c2237..d955b58 100644
--- a/ui/css/theme-default/guest-edit.css
+++ b/ui/css/theme-default/guest-edit.css
@@ -52,7 +52,7 @@
     line-height: 38px;
     margin-top: 5px;
     vertical-align: top;
-    width: 100px;
+    width: 110px;
 }

 #form-guest-edit-storage .guest-edit-wrapper-label {
@@ -60,14 +60,14 @@
 }

 .guest-edit-wrapper-controls {
-    width: 470px;
+    width: 450px;
 }

 #form-guest-edit-storage .guest-edit-wrapper-controls {
-    width: 486px;
+    width: 466px;
 }

-.guest-edit-wrapper-controls input[type="text"] {
+.guest-edit-wrapper-controls input {
     font-size: 16px;
     height: 38px;
     background: #fff;
@@ -77,7 +77,7 @@
     border-top: 1px solid #bbb;
     border-left: 1px solid #bbb;
     padding-left: 10px;
-    width: 450px;
+    width: 430px;
 }

 .guest-edit-wrapper-controls input[type="text"][disabled] {
diff --git a/ui/js/src/kimchi.guest_edit_main.js b/ui/js/src/kimchi.guest_edit_main.js
index 7d24b44..25929ed 100644
--- a/ui/js/src/kimchi.guest_edit_main.js
+++ b/ui/js/src/kimchi.guest_edit_main.js
@@ -388,6 +388,10 @@ kimchi.guest_edit_main = function() {
         if(data['cpus']!=undefined) {
             data['cpus']   = Number(data['cpus']);
         }
+        if(data['password'].length > 0) {
+            data.ticket = {'passwd': data['password']};
+        }
+        delete data['password'];

         kimchi.updateVM(kimchi.selectedGuest, data, function() {
             kimchi.listVmsAuto();
diff --git a/ui/pages/guest-edit.html.tmpl b/ui/pages/guest-edit.html.tmpl
index f24f7de..ef50d86 100644
--- a/ui/pages/guest-edit.html.tmpl
+++ b/ui/pages/guest-edit.html.tmpl
@@ -94,6 +94,19 @@
                                 disabled="disabled" />
                         </div>
                     </div>
+                    <div>
+                        <div class="guest-edit-wrapper-label">
+                            <label for="guest-edit-password-textbox">
+                                $_("Console password")
+                            </label>
+                        </div>
+                        <div class="guest-edit-wrapper-controls">
+                            <input
+                                id="guest-edit-password-textbox"
+                                name="password"
+                                type="password" />
+                        </div>
+                    </div>
                 </fieldset>
             </form>
             <form id="form-guest-edit-storage">