mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
Focus error field after validation.
This commit is contained in:
@@ -34,3 +34,14 @@ $(function(){
|
|||||||
// syntax highlighting by google-code-prettify
|
// syntax highlighting by google-code-prettify
|
||||||
prettyPrint();
|
prettyPrint();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function displayErrors(data){
|
||||||
|
var i = 0;
|
||||||
|
$.each(data, function(key, value){
|
||||||
|
$('#error-' + key.split(".").join("_")).text(value);
|
||||||
|
if(i == 0){
|
||||||
|
$('#' + key).focus();
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user