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=13c83656826aba07926428c05e318e7fb1824711;p=pizzaservice-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/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index db87bd49..e2fc3d27 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -174,6 +174,27 @@ MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY=Fehler: Parameter "message" nicht gesetzt. LOGIN_MESSAGE_DATA_SAVED=Daten wurden gespeichert. PAGE_TITLE_LOGIN_DATA_SAVED=Ihre Daten wurden gespeichert CONTENT_TITLE_LOGIN_DATA_SAVED=Daten wurden gespeichert: +#TODO: Please fix German umlaut! +LOGIN_CHANGE_EMAIL_ADDRESS_TITLE=Aendern Sie Ihre Email-Adresse: +#TODO: Please fix German umlaut! +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_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. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 92beb2b1..ff8e68cb 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -156,6 +156,20 @@ USER_IS_NOT_LOGGED_IN_FULL=To use this feature you need to register and be logge ERROR_CURRENT_PASSWORD_MISMATCHING=Your entered password doesn't match the currently stored one. MESSAGE_BOX_TITLE=Notice: MESSAGE_BOX_PARAMETER_MESSAGE_EMPTY=Error: Parameter "message" not set. +LOGIN_MESSAGE_DATA_SAVED=Data has been saved. +PAGE_TITLE_LOGIN_DATA_SAVED=Your data has been saved +CONTENT_TITLE_LOGIN_DATA_SAVED=Data has been saved: +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_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: +PAGE_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Change your personal data +CONTENT_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Change your address, phone number or others: SELECT_LANGUAGE=Language: DE_DE=Deutsch (DE) EN_US=English (US) @@ -272,9 +286,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/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java index fae504f3..bdd8e1fd 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java @@ -781,6 +781,19 @@ public class PizzaContactWebSessionBean implements PizzaContactWebSessionControl @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/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java b/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java index cca85c6c..fff019e1 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java @@ -122,23 +122,20 @@ public class PizzaEmailChangeWebSessionBean implements PizzaEmailChangeWebSessio 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 address = new EmailAddressChange(user, dummyEmail); + ChangeableEmailAddress emailChange = new EmailAddressChange(user, this.getEmailAddress()); // Call EJB - this.emailBean.enqueueEmailAddressForChange(address); + 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/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 494484c7..1331e0ef 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 29748ece..dd8affff 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 @@
- + - - + +