Skip to content

Commit 2a44f2f

Browse files
authored
fix: wpa enterprise password ui bug (#18)
* fix: wpa enterprise password ui bug Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com> * fix:removed javaconfig file --------- Signed-off-by: SimoneFiorani <simone.fiorani@abinsula.com>
1 parent 9893975 commit 2a44f2f

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

bundles/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/Tab8021xUi.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
package org.eclipse.kura.web.client.ui.network;
1515

1616
import org.eclipse.kura.web.client.messages.Messages;
17-
import org.eclipse.kura.web.client.ui.NewPasswordInput;
1817
import org.eclipse.kura.web.client.util.HelpButton;
1918
import org.eclipse.kura.web.shared.model.Gwt8021xConfig;
2019
import org.eclipse.kura.web.shared.model.Gwt8021xEap;
@@ -25,6 +24,7 @@
2524
import org.gwtbootstrap3.client.ui.Form;
2625
import org.gwtbootstrap3.client.ui.FormGroup;
2726
import org.gwtbootstrap3.client.ui.FormLabel;
27+
import org.gwtbootstrap3.client.ui.Input;
2828
import org.gwtbootstrap3.client.ui.ListBox;
2929
import org.gwtbootstrap3.client.ui.PanelHeader;
3030
import org.gwtbootstrap3.client.ui.TextBox;
@@ -96,7 +96,7 @@ interface Tab8021xUiUiBinder extends UiBinder<Widget, Tab8021xUi> {
9696
TextBox username;
9797

9898
@UiField
99-
NewPasswordInput password;
99+
Input password;
100100

101101
@UiField
102102
TextBox keystorePid;
@@ -267,7 +267,7 @@ private void initPasswordTextBox() {
267267
});
268268

269269
this.password.addBlurHandler(e -> this.password.validate());
270-
this.password.setAllowBlank(false);
270+
this.password.setAllowBlank(true);
271271
this.password.addMouseOutHandler(event -> resetHelpText());
272272

273273
this.password.addChangeHandler(event -> {

bundles/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/Tab8021xUi.ui.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@
9191
<util:HelpButton ui:field="helpPassword"/>
9292
<b:HelpBlock color="red"
9393
ui:field="helpblockPassword" />
94-
<kura:NewPasswordInput type="PASSWORD" b:id="password"
95-
ui:field="password" allowPlaceholder="true"/>
94+
<b:Input type="PASSWORD" b:id="password"
95+
ui:field="password" />
9696
</b:FormGroup>
9797

9898
<b:FormGroup ui:field="identityKeystorePid">

bundles/org.eclipse.kura.web2/src/main/java/org/eclipse/kura/web/client/ui/network/TabWirelessUi.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,11 +1300,9 @@ private void setPasswordValidation() {
13001300
this.password.setValidatorsFrom(Optional.empty(), passwordStrengthRequirements);
13011301
this.password
13021302
.addValidator(GwtValidators.regex(REGEX_PASS_WEP, MSGS.netWifiWirelessInvalidWEPPassword()));
1303-
} else if (this.security != null && this.security.getSelectedItemText().equals(WIFI_SECURITY_NONE_MESSAGE)) {
1304-
this.password.setValidators();
13051303
} else {
1306-
passwordStrengthRequirements.allowAnyPassword();
1307-
this.password.setValidatorsFrom(Optional.empty(), passwordStrengthRequirements);
1304+
// Clears all validators when password is not required
1305+
this.password.setValidators();
13081306
}
13091307
});
13101308

0 commit comments

Comments
 (0)