# HG changeset patch # User Dan # Date 1249421529 14400 # Node ID f4b89aa4226d4230cc83983494393f970e018725 # Parent 1a4f13626f76aa409e19090953fe1a7b3430ed1d Some changes to AJAX login interface, made it a bit more compact with less language, with some Enanium specific modifications to the same. diff -r 1a4f13626f76 -r f4b89aa4226d includes/clientside/static/login.js --- a/includes/clientside/static/login.js Tue Aug 04 15:06:50 2009 -0400 +++ b/includes/clientside/static/login.js Tue Aug 04 17:32:09 2009 -0400 @@ -620,12 +620,16 @@ // Done building the main part of the form form.appendChild(table); + // Checkbox container + var boxen = document.createElement('div'); + boxen.style.textAlign = 'center'; + boxen.style.padding = '7px 0'; + // Field: remember login if ( logindata.user_level <= USER_LEVEL_MEMBER ) { var lbl_remember = document.createElement('label'); lbl_remember.style.fontSize = 'smaller'; - lbl_remember.style.display = 'block'; lbl_remember.style.textAlign = 'center'; // figure out what text to put in the "remember me" checkbox @@ -670,18 +674,24 @@ lbl_remember.appendChild(check_remember); lbl_remember.innerHTML += ' ' + txt_remember; - form.appendChild(lbl_remember); + boxen.appendChild(lbl_remember); } + var bullet = document.createElement('span'); + bullet.innerHTML = ' '; + bullet.style.fontSize = '12pt'; + bullet.style.borderRight = '1px solid #aaa'; + bullet.style.margin = '0 6px 0 4px'; + // Field: enable Diffie Hellman if ( ajax_login_prevent_dh ) { + boxen.appendChild(bullet); var lbl_dh = document.createElement('span'); lbl_dh.style.fontSize = 'smaller'; - lbl_dh.style.display = 'block'; lbl_dh.style.textAlign = 'center'; lbl_dh.innerHTML = $lang.get('user_login_ajax_check_dh_ie'); - form.appendChild(lbl_dh); + boxen.appendChild(lbl_dh); } else if ( !data.allow_diffiehellman ) { @@ -689,13 +699,14 @@ var check_dh = document.createElement('input'); check_dh.type = 'hidden'; check_dh.id = 'ajax_login_field_dh'; - form.appendChild(check_dh); + boxen.appendChild(check_dh); } else { + boxen.appendChild(bullet); + var lbl_dh = document.createElement('label'); lbl_dh.style.fontSize = 'smaller'; - lbl_dh.style.display = 'block'; lbl_dh.style.textAlign = 'center'; var check_dh = document.createElement('input'); check_dh.type = 'checkbox'; @@ -706,9 +717,11 @@ check_dh.id = 'ajax_login_field_dh'; lbl_dh.appendChild(check_dh); lbl_dh.innerHTML += ' ' + $lang.get('user_login_ajax_check_dh'); - form.appendChild(lbl_dh); + boxen.appendChild(lbl_dh); } + form.appendChild(boxen); + if ( IE ) { div.innerHTML += form.outerHTML; @@ -722,17 +735,16 @@ // (only displayed in login, not in re-auth) if ( logindata.user_level == USER_LEVEL_MEMBER ) { - form.style.marginBottom = '10px'; var links = document.createElement('small'); links.style.display = 'block'; links.style.textAlign = 'center'; links.innerHTML = ''; if ( !show_captcha ) - links.innerHTML += $lang.get('user_login_ajax_link_fullform', { link_full_form: makeUrlNS('Special', 'Login/' + title) }) + '
'; + links.innerHTML += $lang.get('user_login_ajax_link_fullform', { link_full_form: makeUrlNS('Special', 'Login/' + title) }) + ' • '; // Always shown - links.innerHTML += $lang.get('user_login_ajax_link_forgotpass', { forgotpass_link: makeUrlNS('Special', 'PasswordReset') }) + '
'; + links.innerHTML += $lang.get('user_login_ajax_link_forgotpass', { forgotpass_link: makeUrlNS('Special', 'PasswordReset') }) + ' • '; if ( !show_captcha ) - links.innerHTML += $lang.get('user_login_createaccount_blurb', { reg_link: makeUrlNS('Special', 'Register') }); + links.innerHTML += $lang.get('user_login_ajax_createaccount_blurb', { reg_link: makeUrlNS('Special', 'Register') }); div.appendChild(links); } diff -r 1a4f13626f76 -r f4b89aa4226d language/english/user.json --- a/language/english/user.json Tue Aug 04 15:06:50 2009 -0400 +++ b/language/english/user.json Tue Aug 04 17:32:09 2009 -0400 @@ -66,18 +66,19 @@ login_ajax_prompt_title: 'Please enter your username and password to continue.', login_ajax_prompt_title_elev: 'You are requesting a sensitive operation.', login_ajax_prompt_body_elev: 'Please re-enter your login details to verify your identity.', - login_ajax_link_fullform: 'Trouble logging in? Try the full login form.', + login_ajax_link_fullform: 'HTML login', login_ajax_link_fullform_dh: 'Don\'t stop this process even if your browser asks you to. If this takes more than 10 seconds, you might want to try the full login form.', - login_ajax_link_forgotpass: 'Did you forget your password?', + login_ajax_link_forgotpass: 'Forgot password', + login_ajax_createaccount_blurb: 'Register', login_ajax_loggingin: 'Logging in...', login_ajax_msg_used_temp_pass: 'You have logged in using a temporary password. Before you can log in, you must finish resetting your password. Do you want to reset your real password now?', - login_ajax_check_dh: 'Enable strong encryption during logon? Learn more', - login_ajax_check_dh_ie: 'Use a standards-compliant browser to help protect your password. Learn more', - login_ajax_check_remember: 'Keep me logged in on this computer for %session_length% %length_units% unless I log out', - login_ajax_check_remember_infinite: 'Keep me logged in on this computer until I log out', + login_ajax_check_remember: 'Stay logged in (%session_length% %length_units%)', + login_ajax_check_remember_infinite: 'Stay logged in', + login_ajax_check_dh: 'Encrypt my details (What?)', + login_ajax_check_dh_ie: 'Browser doesn\'t support encryption (What?)', login_ajax_err_crypto: 'Encryption failed.', - login_ajax_err_crypto_details: 'Details available on console.', - login_ajax_err_crypto_link: 'Use full login form', + login_ajax_err_crypto_details: 'If you have a Javascript debugger, details are available on the console.', + login_ajax_err_crypto_link: 'Use HTML login interface', err_login_generic_title: 'There was an error in the login process', err_key_not_found: 'Enano couldn\'t look up the encryption key used to encrypt your password. This most often happens if a cache rotation occurred during your login attempt, or if you refreshed the login page.', diff -r 1a4f13626f76 -r f4b89aa4226d themes/enanium/css/babygrand.css --- a/themes/enanium/css/babygrand.css Tue Aug 04 15:06:50 2009 -0400 +++ b/themes/enanium/css/babygrand.css Tue Aug 04 17:32:09 2009 -0400 @@ -367,6 +367,11 @@ color: #6488ad; } +div.content a.no_external, div#messageBox a.no_external { + background-image: none; + padding-right: 0px; +} + /* Form controls */ input { border: 1px solid #353535; @@ -377,6 +382,17 @@ padding: 2px; } +div#messageBox input[type ^="text"], div#messageBox input[type ^="password"] { + background-color: #f4f4f4; + color: #202020; + border: 1px solid #aaa; +} + +div#messageBox input[type ^="text"]:focus, div#messageBox input[type ^="password"]:focus { + background-color: #fff; + border-color: #888; +} + /* Footer */ div#footer { margin: 7px 0 0 0;