Skip to content

Commit

Permalink
fix: PLACEHOLDER to use one built into password field
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryIvo committed Oct 22, 2023
1 parent 85411e4 commit d8dbdcb
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ public class Tab8021xUi extends Composite implements NetworkTab {

private static final Messages MSGS = GWT.create(Messages.class);

private static final String PASSWORD_PLACEHOLDER = "Password-Placeholder-123";

interface Tab8021xUiUiBinder extends UiBinder<Widget, Tab8021xUi> {
}

Expand Down Expand Up @@ -250,6 +248,7 @@ private void initPasswordTextBox() {

this.password.addBlurHandler(e -> this.password.validate());
this.password.setAllowBlank(false);
this.password.setAllowPlaceholder(true);
this.password.addMouseOutHandler(event -> resetHelpText());

this.password.addChangeHandler(event -> {
Expand Down Expand Up @@ -398,9 +397,7 @@ public void getUpdatedNetInterface(GwtNetInterfaceConfig updatedNetIf) {

updated8021xConfig.setIdentity(this.username.getText());

if (!(this.password.getText().equals(PASSWORD_PLACEHOLDER))) {
updated8021xConfig.setPassword(this.password.getText());
}
updated8021xConfig.setPassword(this.password.getText());

if (!this.eap.getSelectedValue().isEmpty() && this.eap.getSelectedValue() != null) {
updated8021xConfig.setEap(Gwt8021xEap.valueOf(this.eap.getSelectedValue()));
Expand Down Expand Up @@ -439,9 +436,7 @@ public void setNetInterface(GwtNetInterfaceConfig config) {
this.username.setValue(config.get8021xConfig().getUsername());
this.password.setValue(config.get8021xConfig().getPassword());

if (this.activeConfig.getPassword().isEmpty()) {
this.password.setValue(PASSWORD_PLACEHOLDER);
} else {
if (!this.activeConfig.getPassword().isEmpty()) {
this.password.setValue(this.activeConfig.getPassword());
}

Expand Down

0 comments on commit d8dbdcb

Please sign in to comment.