includes/clientside/static/misc.js
changeset 182 c69730750be3
parent 179 36b287f1d85c
child 204 473cc747022a
child 207 861807631f70
equal deleted inserted replaced
181:06bdbdfec160 182:c69730750be3
   335       break;
   335       break;
   336     case 'locked_out':
   336     case 'locked_out':
   337       $attempts = parseInt($data['lockout_fails']);
   337       $attempts = parseInt($data['lockout_fails']);
   338       if ( $attempts > $data['lockout_threshold'])
   338       if ( $attempts > $data['lockout_threshold'])
   339         $attempts = $data['lockout_threshold'];
   339         $attempts = $data['lockout_threshold'];
   340       window.console.debug('server time ', $data.server_time, ', last time ', $data['lockout_last_time'], ', duration ', $data['lockout_duration']);
   340       $time_rem = $data.time_rem;
   341       $time_rem = $data.lockout_duration - Math.round( ( $data.server_time - $data.lockout_last_time ) / 60 );
       
   342       $s = ( $time_rem == 1 ) ? '' : 's';
   341       $s = ( $time_rem == 1 ) ? '' : 's';
   343       $errstring = "You have used up all "+$data['lockout_threshold']+" allowed login attempts. Please wait "+$time_rem+" minute"+$s+" before attempting to log in again";
   342       $errstring = "You have used up all "+$data['lockout_threshold']+" allowed login attempts. Please wait "+$time_rem+" minute"+$s+" before attempting to log in again";
   344       if ( $data['lockout_policy'] == 'captcha' )
   343       if ( $data['lockout_policy'] == 'captcha' )
   345         $errstring += ', or enter the visual confirmation code shown above in the appropriate box';
   344         $errstring += ', or enter the visual confirmation code shown above in the appropriate box';
   346       $errstring += '.';
   345       $errstring += '.';