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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user