]> source.dussan.org Git - archiva.git/commitdiff
fix validation messages layout and prevent displaying undefined for non mandatory...
authorOlivier Lamy <olamy@apache.org>
Thu, 26 Jan 2012 22:58:01 +0000 (22:58 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 26 Jan 2012 22:58:01 +0000 (22:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1236437 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/network-proxies.js

index 75a0b828579f37c72c00b05c9d4a4822b7ab0d7a..77b9a7c4094f5dc9b849cac79828f88034bb4771 100644 (file)
@@ -37,10 +37,10 @@ $(function() {
     this.port=ko.observable(port);
 
     //private String username;
-    this.username=ko.observable(username);
+    this.username=ko.observable(username?username:"");
 
     //private String password;
-    this.password=ko.observable(password);
+    this.password=ko.observable(password?password:"");
   }
 
   NetworkProxyViewModel=function(networkProxy, update, networkProxiesViewModel){
@@ -188,7 +188,11 @@ $(function() {
   }
 
   activateNetworkProxyFormValidation=function(){
-    $("#main-content #network-proxy-edit-form").validate();
+    $("#main-content #network-proxy-edit-form").validate({
+               showErrors: function(validator, errorMap, errorList) {
+                 customShowError(validator,errorMap,errorMap);
+               }
+              });
   }
 
   activateNetworkProxiesGridTab=function(){