From a9a3bb6163e154963d631c76058ff7b5baca774f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 19 May 2016 13:42:54 +0200 Subject: [PATCH] Continued: - renamed adminHelper to beanHelp as this is a really generic bean helper - renames same class/interface, too - added JSF page for confirming accounts with optional parameter confirmKey. If this is not set, a message will be shown - added i18n keys for above new page - added controller bean for above page to handle the confirmation + calling proper EJB business method MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- ...essbookConfirmationLinkWebRequestBean.java | 198 +++++++++ ...kConfirmationLinkWebRequestController.java | 50 +++ ...AddressbookAdminContactWebRequestBean.java | 18 +- ...a => AddressbookWebRequestController.java} | 2 +- ....java => AddressbookWebRequestHelper.java} | 4 +- .../AddressbookAdminUserWebRequestBean.java | 44 +- .../localization/bundle_de_DE.properties | 7 + .../localization/bundle_en_US.properties | 7 + .../admin/contact/admin_contact_data.tpl | 214 +++++----- .../register/guest_form_register_page2.tpl | 22 + .../register/guest_form_register_single.tpl | 2 +- web/admin/contact/admin_contact_delete.xhtml | 12 +- web/admin/contact/admin_contact_edit.xhtml | 12 +- web/admin/contact/admin_contact_list.xhtml | 4 +- web/admin/contact/admin_contact_show.xhtml | 84 ++-- web/admin/country/admin_country_list.xhtml | 4 +- .../admin_mobile_provider_list.xhtml | 4 +- web/admin/user/admin_user_delete.xhtml | 58 +-- web/admin/user/admin_user_edit.xhtml | 10 +- web/admin/user/admin_user_list.xhtml | 4 +- web/admin/user/admin_user_show.xhtml | 378 +++++++++--------- web/admin/user/admin_user_unlock.xhtml | 58 +-- web/guest/user/confirm_account.xhtml | 51 +++ web/guest/user/resend_link.xhtml | 4 +- 24 files changed, 785 insertions(+), 466 deletions(-) create mode 100644 src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java create mode 100644 src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java rename src/java/org/mxchange/addressbook/beans/helper/{AddressbookAdminWebRequestController.java => AddressbookWebRequestController.java} (96%) rename src/java/org/mxchange/addressbook/beans/helper/{AddressbookAdminWebRequestHelper.java => AddressbookWebRequestHelper.java} (97%) create mode 100644 web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl create mode 100644 web/guest/user/confirm_account.xhtml diff --git a/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java new file mode 100644 index 00000000..b8008ae2 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java @@ -0,0 +1,198 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.confirmlink; + +import java.text.MessageFormat; +import java.util.Iterator; +import java.util.List; +import java.util.Objects; +import javax.enterprise.context.RequestScoped; +import javax.faces.view.facelets.FaceletException; +import javax.inject.Inject; +import javax.inject.Named; +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; +import org.mxchange.addressbook.beans.BaseAddressbookController; +import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController; +import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; +import org.mxchange.jcoreee.utils.FacesUtils; +import org.mxchange.jusercore.exceptions.UserStatusConfirmedException; +import org.mxchange.jusercore.exceptions.UserStatusLockedException; +import org.mxchange.jusercore.model.user.User; +import org.mxchange.jusercore.model.user.UserSessionBeanRemote; +import org.mxchange.jusercore.model.user.status.UserAccountStatus; + +/** + * A web request bean for confirmation link handling + *

+ * @author Roland Haeder + */ +@Named ("confirmationLinkController") +@RequestScoped +public class AddressbookConfirmationLinkWebRequestBean extends BaseAddressbookController implements AddressbookConfirmationLinkWebRequestController { + + /** + * Serial number + */ + private static final long serialVersionUID = 57_637_182_796_370L; + + /** + * Admin helper instance + */ + @Inject + private AddressbookWebRequestController beanHelper; + + /** + * Confirmation key + */ + private String confirmationKey; + + /** + * Remote user bean + */ + private final UserSessionBeanRemote userBean; + + /** + * User controller + */ + @Inject + private AddressbookUserWebSessionController userController; + + /** + * Default constructor + */ + public AddressbookConfirmationLinkWebRequestBean () { + // Try it + try { + // Get initial context + Context context = new InitialContext(); + + // Try to lookup + this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N + } catch (final NamingException e) { + // Throw again + throw new FaceletException(e); + } + } + + @Override + public String getConfirmationKey () { + return this.confirmationKey; + } + + @Override + public void setConfirmationKey (final String confirmationKey) { + this.confirmationKey = confirmationKey; + } + + @Override + public void maybeConfirmUserAccount () { + // Is the confirmation key set? + if (this.getConfirmationKey() == null) { + // May be null if not set + return; + } else if (this.getConfirmationKey().isEmpty()) { + // Is empty string + return; + } + + // Now try to find the user in user list, first get the whole list + List users = this.userController.allUsers(); + + // Get iterator from it + Iterator iterator = users.iterator(); + + // Init instance + User user = null; + + // Then loop through all + while (iterator.hasNext()) { + // Get next user + User next = iterator.next(); + + // Same confirmation key? + if (Objects.equals(this.getConfirmationKey(), next.getUserConfirmKey())) { + // Found it, then set it and abort loop + user = next; + break; + } + } + + // Is the user instance null? + if ((null == user) || (user.getUserAccountStatus() != UserAccountStatus.UNCONFIRMED)) { + // Then clear this bean and the helper + this.beanHelper.setUser(null); + } else { + // Set user ... + this.beanHelper.setUser(user); + + // ... and copy it to the controller + this.beanHelper.copyUserToController(); + + // Try to confirm it + this.confirmUserAccount(); + } + } + + /** + * Tries to confirm the currently set user instance (in helper). + */ + private void confirmUserAccount () { + // Get user instance + User user = this.beanHelper.getUser(); + + // Should be set + if (null == user) { + // Throw NPE + throw new NullPointerException("user is null"); + } else if (user.getUserId() == null) { + // Abort here + throw new NullPointerException("user.userId is null"); //NOI18N + } else if (user.getUserId() < 1) { + // Invalid number + throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N + } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) { + // Account is already confirmed + throw new FaceletException(new UserStatusConfirmedException(user)); + } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) { + // Account is already confirmed + throw new FaceletException(new UserStatusLockedException(user)); + } else if (user.getUserConfirmKey() == null) { + // Throw NPE + throw new NullPointerException("user.userConfirmKey is null"); //NOI18N + } + + // Updated user instance + User updatedUser; + + try { + // Get base URL + String baseUrl = FacesUtils.generateBaseUrl(); + + // Confirm account + updatedUser = this.userBean.confirmAccount(user, baseUrl); + } catch (final UserStatusConfirmedException | UserStatusLockedException ex) { + // Something unexpected happened + throw new FaceletException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N + } + + // Set it again in helper + this.beanHelper.setUser(updatedUser); + } + +} diff --git a/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java new file mode 100644 index 00000000..7f333b26 --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2016 Roland Haeder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ +package org.mxchange.addressbook.beans.confirmlink; + +import java.io.Serializable; + +/** + * An interface for an email change controller + *

+ * @author Roland Haeder + */ +public interface AddressbookConfirmationLinkWebRequestController extends Serializable { + + /** + * Getter for confirmation key + *

+ * @return Confirmation key + */ + String getConfirmationKey (); + + /** + * Setter for confirmation key + *

+ * @param confirmationKey Confirmation key + */ + void setConfirmationKey (final String confirmationKey); + + /** + * Tries to lookup the user by currently set confirmation key and if found + * tries to confirm it. If no user is found, the instance beanHelper.user is + * set to null. Other methods or JSF pages should then respond on this + * accordingly. + */ + void maybeConfirmUserAccount (); + +} diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java index 7b7b9bc4..cd91f9a2 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java @@ -30,7 +30,7 @@ import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; -import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController; +import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jcontacts.contact.UserContact; @@ -75,7 +75,7 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro * Admin helper instance */ @Inject - private AddressbookAdminWebRequestController adminHelper; + private AddressbookWebRequestController beanHelper; /** * Birth day @@ -352,13 +352,13 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro // Check if contact instance is in helper and valid if (null == contact) { // Throw NPE - throw new NullPointerException("adminHelper.contact is null"); //NOI18N + throw new NullPointerException("beanHelper.contact is null"); //NOI18N } else if (contact.getContactId() == null) { // Throw NPE again - throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N + throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N } else if (contact.getContactId() < 1) { // Invalid id - throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N + throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N } // Update all data in contact @@ -380,18 +380,18 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro @Override public String editContactData () { // Get contact instance - Contact contact = this.adminHelper.getContact(); + Contact contact = this.beanHelper.getContact(); // Check if contact instance is in helper and valid if (null == contact) { // Throw NPE - throw new NullPointerException("adminHelper.contact is null"); //NOI18N + throw new NullPointerException("beanHelper.contact is null"); //NOI18N } else if (contact.getContactId() == null) { // Throw NPE again - throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N + throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N } else if (contact.getContactId() < 1) { // Invalid id - throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N + throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N } // Update all data in contact diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestController.java similarity index 96% rename from src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java rename to src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestController.java index fd0cfc10..e20f2433 100644 --- a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestController.java @@ -25,7 +25,7 @@ import org.mxchange.jusercore.model.user.User; *

* @author Roland Haeder */ -public interface AddressbookAdminWebRequestController extends Serializable { +public interface AddressbookWebRequestController extends Serializable { /** * Getter for user instance diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelper.java similarity index 97% rename from src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java rename to src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelper.java index 1994116b..f33ff629 100644 --- a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java +++ b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelper.java @@ -32,7 +32,7 @@ import org.mxchange.jusercore.model.user.User; */ @Named ("adminHelper") @RequestScoped -public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequestController { +public class AddressbookWebRequestHelper implements AddressbookWebRequestController { /** * Serial number @@ -64,7 +64,7 @@ public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequ /** * Default constructor */ - public AddressbookAdminWebRequestHelper () { + public AddressbookWebRequestHelper () { } @Override diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index 5273cf87..c42460d1 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -31,10 +31,8 @@ import javax.naming.InitialContext; import javax.naming.NamingException; import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController; -import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController; -import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController; import org.mxchange.jcontacts.contact.Contact; -import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jusercore.container.login.UserLoginContainer; import org.mxchange.jusercore.events.registration.UserRegisteredEvent; import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent; @@ -73,15 +71,10 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle private Event addedUserEvent; /** - * Admin helper instance + * Bean helper instance */ @Inject - private AddressbookAdminWebRequestController adminHelper; - - /** - * Remote user bean - */ - private final ContactSessionBeanRemote contactBean; + private AddressbookWebRequestController beanHelper; /** * Regular contact controller @@ -107,12 +100,6 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle @Inject private AddressbookUserWebSessionController userController; - /** - * Login bean (controller) - */ - @Inject - private AddressbookUserLoginWebSessionController userLoginController; - /** * User name */ @@ -139,9 +126,6 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle // Try to lookup this.userBean = (UserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N - - // Try to lookup - this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/addressbook-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N } catch (final NamingException e) { // Throw again throw new FaceletException(e); @@ -160,7 +144,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle } else if (this.getUserName().isEmpty()) { // Is empty throw new IllegalArgumentException("userName is null"); //NOI18N - } else if (this.adminHelper.getContact() == null) { + } else if (this.beanHelper.getContact() == null) { // No contact instance set, so test required fields: gender, first name and family name if (this.contactController.getGender() == null) { // Throw NPE again @@ -204,9 +188,9 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle Contact contact; // Is a contact instance in helper set? - if (this.adminHelper.getContact() instanceof Contact) { + if (this.beanHelper.getContact() instanceof Contact) { // Then use it for contact linking - contact = this.adminHelper.getContact(); + contact = this.beanHelper.getContact(); } else { // Create contact instance contact = this.contactController.createContactInstance(); @@ -223,7 +207,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle if (this.userController.isUserNameRegistered(user)) { // User name is already used throw new FaceletException(new UserNameAlreadyRegisteredException(user)); - } else if ((this.adminHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) { + } else if ((this.beanHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) { // Email address is already used throw new FaceletException(new EmailAddressAlreadyRegisteredException(user)); } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) { @@ -249,12 +233,12 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle try { // Now, that all is set, call EJB - if (this.adminHelper.getContact() instanceof Contact) { + if (this.beanHelper.getContact() instanceof Contact) { // Link contact with this user updatedUser = this.userBean.linkUser(user); // Remove contact instance - this.adminHelper.setContact(null); + this.beanHelper.setContact(null); } else { // Add new contact updatedUser = this.userBean.addUser(user); @@ -265,7 +249,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle } // Clear helper - this.adminHelper.setContact(null); + this.beanHelper.setContact(null); // Fire event this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser)); @@ -313,7 +297,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle @Override public String editUserData () { // Get user instance - User user = this.adminHelper.getUser(); + User user = this.beanHelper.getUser(); // Null password means not setting it String encryptedPassword = null; @@ -321,13 +305,13 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle // Check if user instance is in helper and valid if (null == user) { // Throw NPE - throw new NullPointerException("adminHelper.user is null"); //NOI18N + throw new NullPointerException("beanHelper.user is null"); //NOI18N } else if (user.getUserId() == null) { // Throw NPE again - throw new NullPointerException("adminHelper.user.userId is null"); //NOI18N //NOI18N + throw new NullPointerException("beanHelper.user.userId is null"); //NOI18N //NOI18N } else if (user.getUserId() < 1) { // Invalid id - throw new IllegalStateException(MessageFormat.format("adminHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N + throw new IllegalStateException(MessageFormat.format("beanHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N } else if (this.getUserName() == null) { // Not all required fields are set throw new NullPointerException("this.userName is null"); //NOI18N diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 4f941c12..45bc8fe4 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -530,3 +530,10 @@ GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS=Bitte bei der Anmeldung verwendete Email-A GUEST_RESEND_CONFIRMATION_LINK_NOTICE=Der alte Best\u00e4tigungslink wird hiernach verfallen, bitte dann den aus der neueren Mail verwenden. RESEND_CONFIRMATION_LINK_LEGEND=Email-Adresse eingeben: RESEND_CONFIRMATION_LINK_LEGEND_TITLE=Bitte geben Sie Ihre Email-Adresse ein, die Sie bei der Anmeldung verwendet haben. +PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Anmeldung best\u00e4tigen +CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Benutzeranmeldung best\u00e4tigen: +GUEST_CONFIRMATION_LINK_INVALID=Best\u00e4tigungslink nicht mehr g\u00fcltig. Bitte lassen Sie sich einen neuen Link zusenden oder wenden Sie sich an den Support. +GUEST_CONFIRMATION_KEY_NOT_SET=Es wurde keine Best\u00e4tigungsschl\u00fcssel angegeben. Bitte pr\u00fcfen Sie den Link aus der Mail. +GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Vielen Dank f\u00fcr die Best\u00e4tigung +GUEST_USER_CONFIRM_ACCOUNT_DONE=Hallo {0} {1} {2}. Sie haben soeben Ihren Account best\u00e4tigt. Es ist eine Mail mit weiteren Details an Sie unterwegs. +BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Account 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 85071353..c4771384 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -527,3 +527,10 @@ LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data: LINK_LOGIN_CHANGE_PASSWORD_TITLE=Change here your password, if you want another one. LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password +PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm registration +CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm user registration: +GUEST_CONFIRMATION_LINK_INVALID=Confirmation link is no longer valid. Please try to send a new link to your email address or contact support. +GUEST_CONFIRMATION_KEY_NOT_SET=No confirmation key was provided. Please check the link from the mail. +GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Thank you for confirmation of your account +GUEST_USER_CONFIRM_ACCOUNT_DONE=Hello {0} {1} {2}. You have successfully confirmed your account. An email with more details is on it's way to you. +BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Confirm account diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl index 799a19b6..5e29f6f6 100644 --- a/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl +++ b/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl @@ -1,107 +1,107 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl new file mode 100644 index 00000000..1e7e0a89 --- /dev/null +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl @@ -0,0 +1,22 @@ + + + + +

+
+ #{msg.GUEST_REGISTRATION_PAGE2_TITLE} +
+ + + + +
+ + diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl index 043babe7..df3087a7 100644 --- a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl @@ -71,7 +71,7 @@ diff --git a/web/admin/contact/admin_contact_delete.xhtml b/web/admin/contact/admin_contact_delete.xhtml index badc92e3..a3ae28a0 100644 --- a/web/admin/contact/admin_contact_delete.xhtml +++ b/web/admin/contact/admin_contact_delete.xhtml @@ -9,8 +9,8 @@ > - - + + @@ -21,13 +21,13 @@ - + - +
- +
@@ -39,7 +39,7 @@
diff --git a/web/admin/contact/admin_contact_edit.xhtml b/web/admin/contact/admin_contact_edit.xhtml index 0ac502ad..bd123b61 100644 --- a/web/admin/contact/admin_contact_edit.xhtml +++ b/web/admin/contact/admin_contact_edit.xhtml @@ -9,8 +9,8 @@ > - - + + @@ -21,13 +21,13 @@
- + - +
- +
@@ -41,7 +41,7 @@
diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index a139d35f..66ac4199 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -46,7 +46,7 @@ #{msg.ADMIN_CONTACT_USAGE} - + @@ -72,7 +72,7 @@
diff --git a/web/admin/contact/admin_contact_show.xhtml b/web/admin/contact/admin_contact_show.xhtml index fccf2ebc..28131f20 100644 --- a/web/admin/contact/admin_contact_show.xhtml +++ b/web/admin/contact/admin_contact_show.xhtml @@ -1,42 +1,42 @@ - - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT} - - - #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT} - - - - - - - -
- - - -
- -
- - - - -
-
-
- + + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT} + + + + + + + +
+ + + +
+ +
+ + + + +
+
+
+ diff --git a/web/admin/country/admin_country_list.xhtml b/web/admin/country/admin_country_list.xhtml index 2d172240..73737268 100644 --- a/web/admin/country/admin_country_list.xhtml +++ b/web/admin/country/admin_country_list.xhtml @@ -44,7 +44,7 @@ - +
#{msg.ADMIN_ADD_COUNTRY_TITLE} @@ -54,7 +54,7 @@
diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index bf450a76..ebb50f94 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -52,7 +52,7 @@ - +
#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE} @@ -62,7 +62,7 @@
diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index 720c9033..bc0f33aa 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -1,29 +1,29 @@ - - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_DELETE_USER} - - - #{msg.CONTENT_TITLE_ADMIN_DELETE_USER} - - - - - - Here goes your content. - - - + + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_DELETE_USER} + + + #{msg.CONTENT_TITLE_ADMIN_DELETE_USER} + + + + + + Here goes your content. + + + diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index 1578ec17..f7a826ff 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -9,8 +9,8 @@ > - - + + @@ -21,9 +21,9 @@ - + - +
#{msg.ADMIN_EDIT_USER_TITLE} @@ -39,7 +39,7 @@
diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index e94cbf5f..15564ace 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -86,7 +86,7 @@
- + @@ -105,7 +105,7 @@
diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 927dfc9b..3eb471cb 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -1,189 +1,189 @@ - - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_SHOW_USER} - - - #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - -
- -
- - - - -
-
-
- + + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_SHOW_USER} + + + #{msg.CONTENT_TITLE_ADMIN_SHOW_USER} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + +
+
+
+ diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index 7b33fdaa..f5df7f75 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -1,29 +1,29 @@ - - - - - - - - - - - #{msg.PAGE_TITLE_ADMIN_UNLOCK_USER} - - - #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER} - - - - - - Here goes your content. - - - + + + + + + + + + + + #{msg.PAGE_TITLE_ADMIN_UNLOCK_USER} + + + #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER} + + + + + + Here goes your content. + + + diff --git a/web/guest/user/confirm_account.xhtml b/web/guest/user/confirm_account.xhtml new file mode 100644 index 00000000..8b6a4571 --- /dev/null +++ b/web/guest/user/confirm_account.xhtml @@ -0,0 +1,51 @@ + + + + + + + + + + + #{msg.PAGE_TITLE_INDEX_CONFIRM_ACCOUNT} + + + #{msg.CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT} + + + + + +
+
+ +
+ +
+ + + + + +
+
+
+ + + + +
+ + + + +
+
+ diff --git a/web/guest/user/resend_link.xhtml b/web/guest/user/resend_link.xhtml index 6d5c6173..02d6c5cb 100644 --- a/web/guest/user/resend_link.xhtml +++ b/web/guest/user/resend_link.xhtml @@ -17,7 +17,7 @@ - +
@@ -49,7 +49,7 @@
-- 2.39.5