fix validation messages layout and prevent displaying undefined for non mandatory fields

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1236437 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-01-26 22:58:01 +00:00
parent bc5654c331
commit 400eb04c49
1 changed files with 7 additions and 3 deletions

View 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(){