pass reset Small fixes (#4310)

This commit is contained in:
tooomm 2021-04-12 19:28:47 +02:00 committed by GitHub
parent 7d1f082b27
commit 88a8ee09bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 34 additions and 36 deletions

View file

@ -27,9 +27,8 @@ DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent
}
if (servers.getFPHostname().isEmpty() && servers.getFPPort().isEmpty() && servers.getFPPlayerName().isEmpty()) {
QMessageBox::warning(this, tr("Forgot Password Reset Warning"),
tr("Oops, looks like something has gone wrong. Please re-start the forgot password "
"process by using the forgot password button on the connection screen."));
QMessageBox::warning(this, tr("Reset Password Warning"),
tr("A problem has occurred. Please try to request a new password again."));
reject();
}
@ -95,7 +94,7 @@ DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent
mainLayout->addWidget(buttonBox);
setLayout(mainLayout);
setWindowTitle(tr("Forgot Password Reset"));
setWindowTitle(tr("Reset Password"));
setFixedHeight(sizeHint().height());
setMinimumWidth(300);
}
@ -103,22 +102,22 @@ DlgForgotPasswordReset::DlgForgotPasswordReset(QWidget *parent) : QDialog(parent
void DlgForgotPasswordReset::actOk()
{
if (playernameEdit->text().isEmpty()) {
QMessageBox::critical(this, tr("Forgot Password Reset Warning"), tr("The player name can't be empty."));
QMessageBox::critical(this, tr("Reset Password Error"), tr("The player name can't be empty."));
return;
}
if (tokenEdit->text().isEmpty()) {
QMessageBox::critical(this, tr("Forgot Password Reset Warning"), tr("The token can't be empty."));
QMessageBox::critical(this, tr("Reset Password Error"), tr("The token can't be empty."));
return;
}
if (newpasswordEdit->text().isEmpty()) {
QMessageBox::critical(this, tr("Forgot Password Reset Warning"), tr("The new password can't be empty."));
QMessageBox::critical(this, tr("Reset Password Error"), tr("The new password can't be empty."));
return;
}
if (newpasswordEdit->text() != newpasswordverifyEdit->text()) {
QMessageBox::critical(this, tr("Forgot Password Reset Warning"), tr("The passwords do not match."));
QMessageBox::critical(this, tr("Reset Password Error"), tr("The passwords do not match."));
return;
}