includes/clientside/static/login.js
changeset 1065 18d013f98fd0
parent 1052 374d08d176cb
child 1070 617366710de2
equal deleted inserted replaced
1058:c4b057708436 1065:18d013f98fd0
   510   _2.src = ( ajax_login_lockimg_path ) ? ajax_login_lockimg_path : scriptPath + '/images/lock48.png';
   510   _2.src = ( ajax_login_lockimg_path ) ? ajax_login_lockimg_path : scriptPath + '/images/lock48.png';
   511   
   511   
   512   var div = document.createElement('div');
   512   var div = document.createElement('div');
   513   div.id = 'ajax_login_form';
   513   div.id = 'ajax_login_form';
   514   
   514   
   515   var show_captcha = ( data.locked_out && data.lockout_info.lockout_policy == 'captcha' ) ? data.lockout_info.captcha : false;
   515   var show_captcha = ( data.locked_out.locked_out && data.locked_out.lockout_policy == 'captcha' ) ? data.locked_out.captcha : false;
   516   
   516   
   517   // text displayed on re-auth
   517   // text displayed on re-auth
   518   if ( logindata.user_level > USER_LEVEL_MEMBER )
   518   if ( logindata.user_level > USER_LEVEL_MEMBER )
   519   {
   519   {
   520     div.innerHTML += $lang.get('user_login_ajax_prompt_body_elev') + '<br /><br />';
   520     div.innerHTML += $lang.get('user_login_ajax_prompt_body_elev') + '<br /><br />';
   759   logindata.key_dh = data.dh_public_key;
   759   logindata.key_dh = data.dh_public_key;
   760   logindata.captcha_hash = show_captcha;
   760   logindata.captcha_hash = show_captcha;
   761   logindata.loggedin_username = data.username
   761   logindata.loggedin_username = data.username
   762   
   762   
   763   // Are we locked out? If so simulate an error and disable the controls
   763   // Are we locked out? If so simulate an error and disable the controls
   764   if ( data.lockout_info.lockout_policy == 'lockout' && data.locked_out )
   764   if ( data.lockout_info.lockout_policy == 'lockout' && data.locked_out.locked_out )
   765   {
   765   {
   766     f_username.setAttribute('disabled', 'disabled');
   766     f_username.setAttribute('disabled', 'disabled');
   767     f_password.setAttribute('disabled', 'disabled');
   767     f_password.setAttribute('disabled', 'disabled');
   768     var fake_packet = {
   768     var fake_packet = {
   769       error_code: 'locked_out',
   769       error_code: 'locked_out',