From: Patrick Plitzner
Date: Tue, 21 Jun 2016 11:16:16 +0000 (+0200)
Subject: Add menu entry for password dialog to main menu #3102
X-Git-Tag: 4.2.0^2~39
X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/ab81561c4d5f4cd5a53db6b0068d43d820f0f653
Add menu entry for password dialog to main menu #3102
---
diff --git a/eu.etaxonomy.taxeditor.store/plugin.xml b/eu.etaxonomy.taxeditor.store/plugin.xml
index 127b91c2a..babc87b9d 100644
--- a/eu.etaxonomy.taxeditor.store/plugin.xml
+++ b/eu.etaxonomy.taxeditor.store/plugin.xml
@@ -429,6 +429,17 @@
+
+
+
+
+
+
implem
private TextWithLabelElement text_passwordRepeat;
private final PasswordValidator passwordValidator;
- private final UniqueUserNameValidator uniqueUsernameValidator;
-
protected PasswordWizardPage(CdmFormFactory formFactory,
ConversationHolder conversation, User entity) {
super(formFactory, conversation, entity);
passwordValidator = new PasswordValidator();
- uniqueUsernameValidator = new UniqueUserNameValidator();
+
+ setTitle("Change password");
+ setDescription("Change password and confirm with current password");
}
@Override
@@ -70,6 +70,9 @@ public class PasswordWizardPage extends AbstractCdmEntityWizardPage implem
((Text)text_passwordRepeat.getMainControl()).addModifyListener(this);
+ Color bgColor = getShell().getBackground();
+ rootElement.setBackground(bgColor);
+ control.setBackground(bgColor);
setControl(control);
}
@@ -104,28 +107,6 @@ public class PasswordWizardPage extends AbstractCdmEntityWizardPage implem
setErrorMessage(message);
}
- private class UniqueUserNameValidator implements IInputValidator{
-
- private static final String USER_EXISTS = "Username already exists";
- private static final String NAME_TO_SHORT = "Username is empty";
-
- @Override
- public String isValid(String newText) {
- // query for username
- if(newText.length() < 1){
- setPageComplete(false);
- return NAME_TO_SHORT;
- }
- if(CdmStore.getService(IUserService.class).userExists(newText)){
- setPageComplete(false);
- return USER_EXISTS;
- }
-
- setPageComplete(true);
- return null;
- }
- }
-
private class PasswordValidator implements IInputValidator{
private static final int PW_MIN_LENGTH = 5;