From c5be566a6fbf121d1ca140586a02cda18f83b11b Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 20 Jan 2020 14:43:48 +0200 Subject: SL-12596 Fixed incorectly enabled checkbox and enabled login button --- indra/newview/llpanellogin.cpp | 15 +++++++++++---- indra/newview/skins/default/xui/en/panel_login.xml | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index cfa935cd01..7ef3685cdb 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -549,16 +549,19 @@ void LLPanelLogin::populateFields(LLPointer credential, bool remem LL_WARNS() << "Attempted fillFields with no login view shown" << LL_ENDL; return; } - LLUICtrl* remember_check = sInstance->getChild("remember_check"); - remember_check->setValue(remember_psswrd); if (sInstance->mFirstLoginThisInstall) { + LLUICtrl* remember_check = sInstance->getChild("remember_check"); + remember_check->setValue(remember_psswrd); // no list to populate setFields(credential); } else { sInstance->getChild("remember_name")->setValue(remember_user); + LLUICtrl* remember_password = sInstance->getChild("remember_password"); + remember_password->setValue(remember_psswrd); + remember_password->setEnabled(remember_user); sInstance->populateUserList(credential); } } @@ -746,13 +749,14 @@ void LLPanelLogin::getFields(LLPointer& credential, } } credential = gSecAPIHandler->createCredential(LLGridManager::getInstance()->getGrid(), identifier, authenticator); - remember_psswrd = sInstance->getChild("remember_check")->getValue(); if (!sInstance->mFirstLoginThisInstall) { + remember_psswrd = sInstance->getChild("remember_password")->getValue(); remember_user = sInstance->getChild("remember_name")->getValue(); } else { + remember_psswrd = sInstance->getChild("remember_check")->getValue(); remember_user = remember_psswrd; // on panel_login_first "remember_check" is named as 'remember me' } } @@ -1080,6 +1084,7 @@ void LLPanelLogin::onUserNameTextEnty(void*) { sInstance->mPasswordModified = true; sInstance->getChild("password_edit")->setValue(std::string()); + sInstance->mPasswordLength = 0; sInstance->addFavoritesToStartLocation(); //will call updateLoginButtons() } @@ -1119,7 +1124,7 @@ void LLPanelLogin::onRememberUserCheck(void*) if (sInstance && !sInstance->mFirstLoginThisInstall) { LLCheckBoxCtrl* remember_name(sInstance->getChild("remember_name")); - LLCheckBoxCtrl* remember_psswrd(sInstance->getChild("remember_check")); + LLCheckBoxCtrl* remember_psswrd(sInstance->getChild("remember_password")); LLComboBox* user_combo(sInstance->getChild("username_combo")); bool remember = remember_name->getValue().asBoolean(); @@ -1179,6 +1184,8 @@ void LLPanelLogin::updateServer() // restore creds user_combo->setTextEntry(username); pswd_edit->setValue(password); + sInstance->mUsernameLength = username.length(); + sInstance->mPasswordLength = password.length(); } else { diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index 9da0c815ed..eab53c9985 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -151,7 +151,7 @@ label_text.word_wrap="true" label_text.width="150" check_button.bottom="3" - name="remember_check" + name="remember_password" width="170" />