Bug 5885 The automatic submit action pressing the Enter key has been disabled, now the Ajax call that renders the user import list for an Authentication Source is loaded instead.

This commit is contained in:
Gustavo Adolfo Cruz Laura
2011-01-27 20:42:03 +00:00
parent 9cb5bf6e26
commit 8fc53ed051

View File

@@ -25,6 +25,28 @@
<JS type="javascript"><![CDATA[
function disableEnterKey(e)
{
var key;
if(window.event)
key = window.event.keyCode; //IE
else
key = e.which; //firefox
if(key == 13) {
searchUsers();
e.cancelBubble = true;
e.returnValue = false;
if (e.stopPropagation) {
e.stopPropagation();
e.preventDefault();
}
return false;
} else {
return true;
}
}
getField('btnImport').style.visibility = 'hidden';
var searchUsers = function() {
var oRPC = new leimnud.module.rpc.xmlhttp({
@@ -76,6 +98,9 @@ function cancel(){
window.location = 'authSources_List';
}
leimnud.event.add(getField('KEYWORD'), 'keypress', function(event) {
return disableEnterKey(event);
});
]]></JS>