From: Roland Häder Date: Mon, 2 May 2016 13:52:12 +0000 (+0200) Subject: Continued with fixes/rewrites: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0706d009f46e910e512d277aacdefd21da13c613;p=jfinancials-war.git Continued with fixes/rewrites: - moved+renamed generic/form_personal_data.tpl contact/form_contact_data.tpl - renamed emailAddress1 -> emailAddress + emailAddress2 -> emailAddressRepeat - clear bean after all, so no new object is needed Signed-off-by: Roland Häder Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java index 397f039a..6dcff572 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java @@ -760,6 +760,19 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe @Override public boolean isEmailAddressRegistered (final Contact contact) { + // Cherck parameter + if (null == contact) { + // Throw NPE + throw new NullPointerException("contact is null"); //NOI18N + } else if (contact.getContactEmailAddress() == null) { + // Throw again + throw new NullPointerException("contact.contactEmailAddress is null"); //NOI18N + } else if (contact.getContactEmailAddress().isEmpty()) { + // Is empty + throw new IllegalArgumentException("contact.contactEmailAddress is empty."); //NOI18N + } + + // Determine it return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(contact.getContactEmailAddress()))); } diff --git a/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java index 0c8956d0..084fe843 100644 --- a/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java @@ -122,23 +122,20 @@ public class AddressbookEmailChangeWebSessionBean implements AddressbookEmailCha assert (user.getUserContact().getContactId() instanceof Long) : "Instance loginController.userContact.contactId is null"; //NOI18N assert (user.getUserContact().getContactId() > 0) : MessageFormat.format("Instance loginController.userContact.contactId={0} is invalid", user.getUserContact().getContactId()); //NOI18N - // Get dummy email address - String dummyEmail = this.getEmailAddress(); - - // Unset all so the user is forced to re-enter it - this.clear(); - // Check if the email address is already enqueued - if (this.isEmailAddressQueued(dummyEmail)) { + if (this.isEmailAddressQueued(this.getEmailAddress())) { // Yes, then abort here return "login_email_already_added"; //NOI18N } // Create change object, to save EJB calls, the hash is not generated here - ChangeableEmailAddress emailAddress = new EmailAddressChange(user, dummyEmail); + ChangeableEmailAddress emailChange = new EmailAddressChange(user, this.getEmailAddress()); // Call EJB - this.emailBean.enqueueEmailAddressForChange(emailAddress); + this.emailBean.enqueueEmailAddressForChange(emailChange); + + // Unset all so the user is forced to re-enter it + this.clear(); // All fine return "login_email_change_queued"; //NOI18N diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index d2bc8185..3e7f5ef2 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -258,8 +258,24 @@ LOGIN_CHANGE_EMAIL_LEGEND=Email-Adresse aendern: #TODO: Please fix German umlaut! LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Hier koennen Sie Ihre Email-Adresse aendern. Dazu muessen Sie diese zweimal eingeben und die neue Adresse bestaetigen. LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Ihre derzeitige Email-Adresse: -LOGIN_CHANGE_EMAIL_ENTER_EMAIL1=Neue Email-Adresse eingeben: -LOGIN_CHANGE_EMAIL_ENTER_EMAIL2=Neue Email-Adresse wiederholen: +LOGIN_CHANGE_EMAIL_ENTER_EMAIL=Neue Email-Adresse eingeben: +LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT=Neue Email-Adresse wiederholen: +#TODO: Please fix German umlaut! +BUTTON_CHANGE_EMAIL_ADDRESS=Email-Adresse aendern +#TODO: Please fix German umlaut! +PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Aendern Ihrer Email-Adresse +CONTENT_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Neue Email-Adresse eingeben: +#TODO: Please fix German umlaut! +PAGE_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Ihre persoenlichen Daten aendern +#TODO: Please fix German umlaut! +CONTENT_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Aendern Ihrer Adresse, Telefonnummer usw.: +LOGIN_MESSAGE_DATA_SAVED=Daten wurden gespeichert. +PAGE_TITLE_LOGIN_DATA_SAVED=Ihre Daten wurden gespeichert +CONTENT_TITLE_LOGIN_DATA_SAVED=Daten wurden gespeichert: +LOGIN_CHANGE_EMAIL_ADDRESS_TITLE=\u00c4ndern Sie Ihre Email-Adresse: +LOGIN_CHANGE_EMAIL_LEGEND=Email-Adresse \u00e4ndern: +LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Hier k\u00f6nnen Sie Ihre Email-Adresse \u00e4ndern. Dazu m\u00fcssen Sie diese zweimal eingeben und die neue Adresse best\u00e4tigen. +LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Ihre derzeitige Email-Adresse: #TODO: Please fix German umlaut! BUTTON_CHANGE_EMAIL_ADDRESS=Email-Adresse aendern #TODO: Please fix German umlaut! diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 4450e7f5..2f16e330 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -246,8 +246,8 @@ LOGIN_CHANGE_EMAIL_ADDRESS_TITLE=Change your email address: LOGIN_CHANGE_EMAIL_LEGEND=Change email address: LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Here you can change your email address. You can do this by entering it twice and then confirm the new one. LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Your current email address: -LOGIN_CHANGE_EMAIL_ENTER_EMAIL1=Enter new email address: -LOGIN_CHANGE_EMAIL_ENTER_EMAIL2=Repeat new email address: +LOGIN_CHANGE_EMAIL_ENTER_EMAIL=Enter new email address: +LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT=Repeat new email address: BUTTON_CHANGE_EMAIL_ADDRESS=Change email address PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address CONTENT_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Enter new email address: @@ -369,9 +369,6 @@ ADMIN_LIST_USER_CREATED=Registered: USER_ACCOUNT_STATUS_CONFIRMED=Confirmed USER_ACCOUNT_STATUS_UNCONFIRMED=Unconfirmed USER_ACCOUNT_STATUS_LOCKED=Locked -USER_PROFILE_MODE_INVISIBLE=Invisible -USER_PROFILE_MODE_MEMBERS=Only members -USER_PROFILE_MODE_PUBLIC=Public ADMIN_LINK_SHOW_USER_TITLE=Show administrative user profile PAGE_TITLE_ADMIN_SHOW_USER=Show user profile CONTENT_TITLE_ADMIN_SHOW_USER=Show profile of a user: diff --git a/web/WEB-INF/templates/generic/form_personal_data.tpl b/web/WEB-INF/templates/generic/form_personal_data.tpl deleted file mode 100644 index dd605687..00000000 --- a/web/WEB-INF/templates/generic/form_personal_data.tpl +++ /dev/null @@ -1,218 +0,0 @@ - - - -
- #{msg.PERSONAL_DATA_MINIMUM_NOTICE} -
- -
-
- #{msg.PERSONAL_DATA_LEGEND} - -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
- -
-
- -
- -
- - - - -
- -
-
- -
-
- -
- -
- - - - - - - - - - - - -
- -
-
- -
-
- -
- -
- - - - - - - - - - - - -
- -
-
- -
-
- -
- -
- - - -
- -
-
-
-
- -
-
- #{msg.USER_PROFILE_LEGEND} - -
-
- -
- -
- -
- -
-
- -
-
-
    -
  • #{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}
  • -
  • #{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}
  • -
  • #{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}
  • -
-
-
-
-
-
diff --git a/web/WEB-INF/templates/guest/user/guest_registration_form.tpl b/web/WEB-INF/templates/guest/user/guest_registration_form.tpl index 10114a5d..c95a7639 100644 --- a/web/WEB-INF/templates/guest/user/guest_registration_form.tpl +++ b/web/WEB-INF/templates/guest/user/guest_registration_form.tpl @@ -12,7 +12,7 @@ #{msg.GUEST_REGISTRATION_TITLE} - +
@@ -32,7 +32,7 @@
- +
@@ -44,7 +44,7 @@
- +
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl new file mode 100644 index 00000000..55c2ebdd --- /dev/null +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl @@ -0,0 +1,97 @@ + + + + + +
+
+ #{msg.GUEST_REGISTRATION_TITLE} +
+ + + +
+
+ #{msg.GUEST_REGISTRATION_EMAIL_LEGEND} + +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE} +
+
+
+ + + + +
+
+
diff --git a/web/user/login_change_email_address.xhtml b/web/user/login_change_email_address.xhtml index 756c2f44..3cfd020c 100644 --- a/web/user/login_change_email_address.xhtml +++ b/web/user/login_change_email_address.xhtml @@ -3,12 +3,12 @@ + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > - + #{msg.PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS} @@ -33,7 +33,7 @@
- #{contactController.emailAddress} + #{userController.emailAddress}
@@ -45,7 +45,7 @@
- +
@@ -57,7 +57,7 @@
- +
@@ -65,18 +65,18 @@
- + - - + +