X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Fnewpwd.js;h=977e9959a7418aa7dc463543f654332d54b32b02;hb=1f6105289a49079809c2a4677b561bc82c62db88;hp=02f402385bf0f3c4ad3b03f4513f4f453474f208;hpb=9efd079d59d269811abc4c551b2f39ab2e6a05fb;p=syj.git diff --git a/public/js/newpwd.js b/public/js/newpwd.js index 02f4023..977e995 100644 --- a/public/js/newpwd.js +++ b/public/js/newpwd.js @@ -1,4 +1,4 @@ -/* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier, +/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier, and is published under the AGPL license. */ function insertErrorBefore(elt, messageError) { var message = new Element("div", {className: 'error'}).update(messageError); @@ -16,16 +16,14 @@ document.observe("dom:loaded", function() { tofocus = $$('form input:not([readonly],[disabled])')[0]; } if (tofocus) { - tofocus.focus(); - tofocus.select(); + tofocus.activate(); } $("newpwdform").observe('submit', function(evt) { $$('.error').invoke('remove'); if ($('newpwd_email').value.strip().empty()) { insertErrorBefore($('newpwdform').select('table')[0], SyjStrings.notEmptyField); - $('newpwd_email').highlight('#F08080').focus(); - $('newpwd_email').select(); + $('newpwd_email').highlight('#F08080').activate(); evt.stop(); } });