Clear repeat password field when unequal passwords are entered
This commit is contained in:
parent
cde91a77ef
commit
4e9702a691
@ -114,8 +114,10 @@ public final class LoginScene {
|
||||
private void loginButtonPressed() {
|
||||
|
||||
// Prevent registration with unequal passwords
|
||||
if (registerCheckBox.isSelected() && !passwordField.getText().equals(repeatPasswordField.getText()))
|
||||
if (registerCheckBox.isSelected() && !passwordField.getText().equals(repeatPasswordField.getText())) {
|
||||
new Alert(AlertType.ERROR, "The entered password is unequal to the repeated one").showAndWait();
|
||||
repeatPasswordField.clear();
|
||||
}
|
||||
else performHandshake(
|
||||
new LoginCredentials(userTextField.getText(), passwordField.getText().toCharArray(), registerCheckBox.isSelected(), Startup.VERSION));
|
||||
}
|
||||
|
Reference in New Issue
Block a user