includes/clientside/static/login.js
changeset 550 685e839d934e
parent 532 03429d7b1537
child 582 a38876c0793c
equal deleted inserted replaced
549:6894cfd94dfb 550:685e839d934e
    91 function ajaxLoginInit(call_on_finish, user_level)
    91 function ajaxLoginInit(call_on_finish, user_level)
    92 {
    92 {
    93   logindata = {};
    93   logindata = {};
    94   
    94   
    95   var title = ( user_level > USER_LEVEL_MEMBER ) ? $lang.get('user_login_ajax_prompt_title_elev') : $lang.get('user_login_ajax_prompt_title');
    95   var title = ( user_level > USER_LEVEL_MEMBER ) ? $lang.get('user_login_ajax_prompt_title_elev') : $lang.get('user_login_ajax_prompt_title');
    96   logindata.mb_object = new messagebox(MB_OKCANCEL | MB_ICONLOCK, title, '');
    96   logindata.mb_object = new MessageBox(MB_OKCANCEL | MB_ICONLOCK, title, '');
    97   
    97   
    98   logindata.mb_object.onclick['Cancel'] = function()
    98   logindata.mb_object.onclick['Cancel'] = function()
    99   {
    99   {
   100     // Hide the error message and captcha
   100     // Hide the error message and captcha
   101     if ( document.getElementById('ajax_login_error_box') )
   101     if ( document.getElementById('ajax_login_error_box') )
   336   // Did the server send a plaintext error?
   336   // Did the server send a plaintext error?
   337   if ( response.mode == 'error' )
   337   if ( response.mode == 'error' )
   338   {
   338   {
   339     logindata.mb_object.destroy();
   339     logindata.mb_object.destroy();
   340     var error_msg = $lang.get('user_' + ( response.error.toLowerCase() ));
   340     var error_msg = $lang.get('user_' + ( response.error.toLowerCase() ));
   341     new messagebox(MB_ICONSTOP | MB_OK, $lang.get('user_err_login_generic_title'), error_msg);
   341     new MessageBox(MB_ICONSTOP | MB_OK, $lang.get('user_err_login_generic_title'), error_msg);
   342     return false;
   342     return false;
   343   }
   343   }
   344   // Main mode switch
   344   // Main mode switch
   345   switch ( response.mode )
   345   switch ( response.mode )
   346   {
   346   {