diff -r 7c4a851fb5c5 -r 71b50f8c8f85 includes/clientside/static/misc.js --- a/includes/clientside/static/misc.js Tue Jul 10 03:38:19 2007 -0400 +++ b/includes/clientside/static/misc.js Tue Jul 10 11:59:02 2007 -0400 @@ -300,14 +300,15 @@ ajax_auth_prompt_cache = call_on_ok; } if ( !level ) - level = 2; + level = USER_LEVEL_MEMBER; ajax_auth_level_cache = level; var loading_win = '
\

Fetching an encryption key...

\

Not working? Use the alternate login form.

\

Please wait...

\
'; - ajax_auth_mb_cache = new messagebox(MB_OKCANCEL|MB_ICONLOCK, 'Please enter your username and password to continue.', loading_win); + var title = ( level > USER_LEVEL_MEMBER ) ? 'You are requesting a sensitive operation.' : 'Please enter your username and password to continue.'; + ajax_auth_mb_cache = new messagebox(MB_OKCANCEL|MB_ICONLOCK, title, loading_win); ajax_auth_mb_cache.onbeforeclick['OK'] = ajaxValidateLogin; ajaxAuthLoginInnerSetup(); } @@ -324,7 +325,13 @@ return false; } response = parseJSON(response); - var form_html = ' \ + var level = ajax_auth_level_cache; + var form_html = ''; + if ( level > USER_LEVEL_MEMBER ) + { + form_html += 'Please re-enter your login details, to verify your identity.

'; + } + form_html += ' \ \ \ \ \ \ \
Username: \ @@ -334,9 +341,14 @@
\ -
Trouble logging in? Try the full login form.
\ +
Trouble logging in? Try the full login form.
'; + if ( level <= USER_LEVEL_MEMBER ) + { + form_html += ' \ Did you forget your password?
\ - Maybe you need to create an account.
\ + Maybe you need to create an account.
'; + } + form_html += ' \
\ @@ -345,7 +357,15 @@ '; ajax_auth_mb_cache.updateContent(form_html); $('messageBox').object.nextSibling.firstChild.tabindex = '3'; - $('ajaxlogin_user').object.focus(); + if ( typeof(response.username) == 'string' ) + { + $('ajaxlogin_user').object.value = response.username; + $('ajaxlogin_pass').object.focus(); + } + else + { + $('ajaxlogin_user').object.focus(); + } $('ajaxlogin_pass').object.onblur = function(e) { if ( !shift ) $('messageBox').object.nextSibling.firstChild.focus(); }; $('ajaxlogin_pass').object.onkeypress = function(e) { if ( !e && IE ) return true; if ( e.keyCode == 13 ) $('messageBox').object.nextSibling.firstChild.click(); }; }