[Kimchi-devel] [PATCH] [Kimchi] Edit template storage path should start with "/"

rajgupta at linux.vnet.ibm.com rajgupta at linux.vnet.ibm.com
Wed Nov 2 08:58:44 UTC 2016


From: Rajat Gupta <rajat.triumph at gmail.com>

Edit template storage path should start with "/"

Signed-off-by: Rajat Gupta <rajat.triumph at gmail.com>
---
 ui/js/src/kimchi.template_edit_main.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.template_edit_main.js b/ui/js/src/kimchi.template_edit_main.js
index 1a6e473..758201f 100644
--- a/ui/js/src/kimchi.template_edit_main.js
+++ b/ui/js/src/kimchi.template_edit_main.js
@@ -339,7 +339,8 @@ kimchi.template_edit_main = function() {
                 });
 
                 $(storageRow + ' input.storage-path').on('change input keyup',function(){
-                    if($(storageRow + ' input.storage-path').val()){
+                    var storagepath = $(storageRow + ' input.storage-path').val();
+                    if( storagepath && storagepath.charAt(0) == '/'){
                         $(storageRow + ' span.storage-path').removeClass('has-error');
                     }else{
                         $(storageRow + ' span.storage-path').addClass('has-error');
-- 
2.1.0




More information about the Kimchi-devel mailing list