From: Roland Häder Date: Thu, 12 May 2016 16:18:23 +0000 (+0200) Subject: Rewritten a lot: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ec229688bd857d1eb2cf324eaf2efc98a9f76856;p=jfinancials-war.git Rewritten a lot: - introduced isUserNameRequired() which should make it sure to have registrations with no user name and password. This also includes no login area (not possible) - the user then will get a random user name with format "userXXXXX" and a random password. So it is still possible that the "feature" login area for users can come back. - so no "recover password" is possible, too. Therefore such links can be removed from the menu. - introduced isMultiplePageEnabled() which is used as a "switch" between single-page and multiple-page registration - introduced isPublicUserProfileEnabled() which is used to disabled/enable the feature "public user profiles" which is sometimes not wanted ... - introduced isResendConfirmationLinkEnabled() which disabled the corresponding feature - showing a "choose profile-mode" while no public user profile is enabled makes no sense ... So better "hide" this option. - introduced general (abstract) controller BaseController which currently holds a method for checking if for a named controller debug mode is enabled - renamed doRegister() to doFinishRegistration() - removed no longer used i18n strings (they may have come back by cherry-picking) - registration page 1/2 should be "basicly finished" now, single is also available - index page is now jlandingpage-specific as registration page is in index.xhtml (careful, cherry-picking this!) - added controller method doRegisterMultiPage1() - added a lot more language strings - renamed variables - added context parameters for above new methods - added needed navigation cases (careful with cherry-picking again) - sorted imports (minor) - fixed i18n string (usage) Signed-off-by: Roland Häder Signed-off-by: Roland Häder --- diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 298bfc50..676c3694 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -1,6 +1,66 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java new file mode 100644 index 00000000..bee8b0ac --- /dev/null +++ b/src/java/org/mxchange/addressbook/beans/BaseAddressbookController.java @@ -0,0 +1,61 @@ +/* + * 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; + +import java.io.Serializable; +import javax.faces.context.FacesContext; + +/** + * A general controller + *

+ * @author Roland Haeder + */ +public abstract class BaseAddressbookController implements Serializable { + + /** + * Serial number + */ + private static final long serialVersionUID = 50_837_597_127_567_140L; + + /** + * Checks whether debug mode is enabled for given controller + *

+ * @param controllerName Name of controller + *

+ * @return Whether debug mode is enabled + */ + protected boolean isDebugModeEnabled (final String controllerName) { + // Parameters should be valid + if (null == controllerName) { + // Throw NPE + throw new NullPointerException("controllerName is null"); //NOI18N + } else if (controllerName.isEmpty()) { + // Is empty + throw new IllegalArgumentException("controllerName is empty"); //NOI18N + } + + // Try to get context parameter + String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_debug_%s_enabled", controllerName)); //NOI18N + + // Is it set and true? + boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.equals("true"))); //NOI18N + + // Return it + return isEnabled; + } + +} diff --git a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java index 3a5347e0..52c34583 100644 --- a/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/addressbook/AddressbookWebSessionBean.java @@ -35,6 +35,7 @@ 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.login.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.model.addressbook.AddressbookSessionBeanRemote; import org.mxchange.jaddressbookcore.events.addressbook.AddressbookLoadedEvent; @@ -54,7 +55,7 @@ import org.mxchange.jusercore.model.user.User; */ @Named ("addressbookController") @SessionScoped -public class AddressbookWebSessionBean implements AddressbookWebSessionController { +public class AddressbookWebSessionBean extends BaseAddressbookController implements AddressbookWebSessionController { /** * Map for count of user's shared addresses diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java index 33870172..7b7b9bc4 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java @@ -29,6 +29,7 @@ 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.AddressbookAdminWebRequestController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; @@ -56,7 +57,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; */ @Named ("adminContactController") @RequestScoped -public class AddressbookAdminContactWebRequestBean implements AddressbookAdminContactWebRequestController { +public class AddressbookAdminContactWebRequestBean extends BaseAddressbookController implements AddressbookAdminContactWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java index 89c9c3a6..17c5695b 100644 --- a/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java @@ -31,6 +31,7 @@ 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.login.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; @@ -60,7 +61,7 @@ import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; */ @Named ("contactController") @SessionScoped -public class AddressbookContactWebSessionBean implements AddressbookContactWebSessionController { +public class AddressbookContactWebSessionBean extends BaseAddressbookController implements AddressbookContactWebSessionController { /** * Serial number @@ -172,12 +173,6 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe */ private boolean isLandLineUnlinked; - /** - * Login bean (controller) - */ - @Inject - private AddressbookUserLoginWebSessionController loginController; - /** * Phone number area code */ @@ -198,6 +193,12 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe */ private String street; + /** + * Login bean (controller) + */ + @Inject + private AddressbookUserLoginWebSessionController userLoginController; + /** * ZIP code */ @@ -493,19 +494,19 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe @Override public String doChangePersonalContactData () { // This method shall only be called if the user is logged-in - if (!this.loginController.isUserLoggedIn()) { + if (!this.userLoginController.isUserLoggedIn()) { // Not logged-in throw new IllegalStateException("User is not logged-in"); //NOI18N } else if (!this.isRequiredChangePersonalDataSet()) { // Not all required fields are set throw new FaceletException("Not all required fields are set."); //NOI18N - } else if (!this.loginController.ifCurrentPasswordMatches()) { + } else if (!this.userLoginController.ifCurrentPasswordMatches()) { // Password not matching - throw new FaceletException(new UserPasswordMismatchException(this.loginController.getLoggedInUser())); + throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); } // Get contact instance - Contact contact = this.loginController.getLoggedInUser().getUserContact(); + Contact contact = this.userLoginController.getLoggedInUser().getUserContact(); // It should be there, so run some tests on it assert (contact instanceof Contact) : "Instance loginController.loggedInUser.userContact is null"; //NOI18N diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java index 1cb88004..a46fee02 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookAdminCountryWebRequestBean.java @@ -28,6 +28,7 @@ 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.jcountry.data.Country; import org.mxchange.jcountry.data.CountryData; import org.mxchange.jcountry.data.CountrySingletonBeanRemote; @@ -42,7 +43,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; */ @Named ("adminCountryController") @RequestScoped -public class AddressbookAdminCountryWebRequestBean implements AddressbookAdminCountryWebRequestController { +public class AddressbookAdminCountryWebRequestBean extends BaseAddressbookController implements AddressbookAdminCountryWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java index ada0bb61..d88455f9 100644 --- a/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/country/AddressbookCountryWebApplicationBean.java @@ -27,6 +27,7 @@ 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.jcountry.data.Country; import org.mxchange.jcountry.data.CountrySingletonBeanRemote; import org.mxchange.jcountry.events.AdminAddedCountryEvent; @@ -38,7 +39,7 @@ import org.mxchange.jcountry.events.AdminAddedCountryEvent; */ @Named ("countryController") @ApplicationScoped -public class AddressbookCountryWebApplicationBean implements AddressbookCountryWebApplicationController { +public class AddressbookCountryWebApplicationBean extends BaseAddressbookController implements AddressbookCountryWebApplicationController { /** * Serial number 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 084fe843..4337db00 100644 --- a/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java @@ -26,6 +26,7 @@ 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.login.AddressbookUserLoginWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; @@ -41,7 +42,7 @@ import org.mxchange.jusercore.model.user.User; */ @Named ("emailChangeController") @SessionScoped -public class AddressbookEmailChangeWebSessionBean implements AddressbookEmailChangeWebSessionController { +public class AddressbookEmailChangeWebSessionBean extends BaseAddressbookController implements AddressbookEmailChangeWebSessionController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java index 0cf0d1c6..c2371e88 100644 --- a/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/gender/AddressbookGenderWebApplicationBean.java @@ -19,6 +19,7 @@ package org.mxchange.addressbook.beans.gender; import java.util.List; import javax.enterprise.context.ApplicationScoped; import javax.inject.Named; +import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.jcontacts.contact.gender.Gender; import org.mxchange.jcontacts.contact.gender.GenderUtils; @@ -29,7 +30,7 @@ import org.mxchange.jcontacts.contact.gender.GenderUtils; */ @Named ("genderController") @ApplicationScoped -public class AddressbookGenderWebApplicationBean implements AddressbookGenderWebApplicationController { +public class AddressbookGenderWebApplicationBean extends BaseAddressbookController implements AddressbookGenderWebApplicationController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java index 9bf7f1b3..c1f029b1 100644 --- a/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/localization/AddressbookLocalizationSessionBean.java @@ -21,7 +21,7 @@ import javax.annotation.PostConstruct; import javax.faces.bean.SessionScoped; import javax.faces.context.FacesContext; import javax.inject.Named; -import org.mxchange.jcoreee.database.BaseDatabaseBean; +import org.mxchange.addressbook.beans.BaseAddressbookController; /** * A session bean for handling localization/internationalization changes. This @@ -33,7 +33,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean; */ @Named ("localizationController") @SessionScoped -public class AddressbookLocalizationSessionBean extends BaseDatabaseBean implements AddressbookLocalizationSessionController { +public class AddressbookLocalizationSessionBean extends BaseAddressbookController implements AddressbookLocalizationSessionController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java index 38b4ee8e..6f38d3fb 100644 --- a/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/login/AddressbookUserLoginWebSessionBean.java @@ -26,6 +26,8 @@ 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.user.AddressbookUserWebSessionController; import org.mxchange.jusercore.container.login.LoginContainer; import org.mxchange.jusercore.container.login.UserLoginContainer; import org.mxchange.jusercore.events.login.UserLoggedInEvent; @@ -39,7 +41,6 @@ import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; import org.mxchange.jusercore.model.user.status.UserAccountStatus; -import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; /** * A web bean for user registration @@ -48,7 +49,7 @@ import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; */ @Named ("loginController") @SessionScoped -public class AddressbookUserLoginWebSessionBean implements AddressbookUserLoginWebSessionController { +public class AddressbookUserLoginWebSessionBean extends BaseAddressbookController implements AddressbookUserLoginWebSessionController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java index b6d511b9..3ba0d243 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookAdminMobileProviderWebRequestBean.java @@ -28,6 +28,7 @@ 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.jcountry.data.Country; import org.mxchange.jphone.events.AdminAddedMobileProviderEvent; import org.mxchange.jphone.events.AdminMobileProviderAddedEvent; @@ -43,7 +44,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; */ @Named ("adminMobileProviderController") @RequestScoped -public class AddressbookAdminMobileProviderWebRequestBean implements AddressbookAdminMobileProviderWebRequestController { +public class AddressbookAdminMobileProviderWebRequestBean extends BaseAddressbookController implements AddressbookAdminMobileProviderWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java index 408accfd..be138c76 100644 --- a/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/mobileprovider/AddressbookMobileProviderWebRequestBean.java @@ -27,6 +27,7 @@ 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.jphone.events.AdminAddedMobileProviderEvent; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider; import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBeanRemote; @@ -38,7 +39,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProviderSingletonBe */ @Named ("mobileProviderController") @SessionScoped -public class AddressbookMobileProviderWebRequestBean implements AddressbookMobileProviderWebRequestController { +public class AddressbookMobileProviderWebRequestBean extends BaseAddressbookController implements AddressbookMobileProviderWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java index 57c40db5..503db8e2 100644 --- a/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/phone/AddressbookAdminContactPhoneWebRequestBean.java @@ -25,6 +25,7 @@ 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.jcontacts.contact.Contact; import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote; import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber; @@ -38,7 +39,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber; */ @Named ("adminContactPhoneController") @RequestScoped -public class AddressbookAdminContactPhoneWebRequestBean implements AddressbookAdminContactPhoneWebRequestController { +public class AddressbookAdminContactPhoneWebRequestBean extends BaseAddressbookController implements AddressbookAdminContactPhoneWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java index abedbba9..45040fc6 100644 --- a/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/profile/AddressbookUserProfileWebRequestBean.java @@ -21,6 +21,7 @@ import javax.enterprise.context.RequestScoped; import javax.faces.view.facelets.FaceletException; import javax.inject.Inject; import javax.inject.Named; +import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -34,7 +35,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; */ @Named (value = "profileController") @RequestScoped -public class AddressbookUserProfileWebRequestBean implements AddressbookUserProfileWebRequestController { +public class AddressbookUserProfileWebRequestBean extends BaseAddressbookController implements AddressbookUserProfileWebRequestController { /** * Serial number @@ -56,24 +57,24 @@ public class AddressbookUserProfileWebRequestBean implements AddressbookUserProf @Override public boolean isProfileLinkVisibleById (final Long userId) { // Init user instance - User u = null; + User user = null; try { // Try to get it - u = this.userController.lookupUserById(userId); + user = this.userController.lookupUserById(userId); } catch (final UserNotFoundException ex) { // Throw again throw new FaceletException(ex); } // Is it null? - if (null == u) { + if (null == user) { // Not found, not visible. return false; } // Ask other method - return this.isProfileLinkVisibleByUser(u); + return this.isProfileLinkVisibleByUser(user); } @Override diff --git a/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java b/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java index e39bb52d..6b7a95ce 100644 --- a/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java +++ b/src/java/org/mxchange/addressbook/beans/profilemode/AddressbookProfileModeWebApplicationBean.java @@ -18,6 +18,7 @@ package org.mxchange.addressbook.beans.profilemode; import javax.enterprise.context.ApplicationScoped; import javax.inject.Named; +import org.mxchange.addressbook.beans.BaseAddressbookController; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; /** @@ -27,7 +28,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; */ @Named ("profileMode") @ApplicationScoped -public class AddressbookProfileModeWebApplicationBean implements AddressbookProfileModeWebApplicationController { +public class AddressbookProfileModeWebApplicationBean extends BaseAddressbookController implements AddressbookProfileModeWebApplicationController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java index 062bec04..6f6d2e15 100644 --- a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionBean.java @@ -20,12 +20,14 @@ import java.text.MessageFormat; import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Event; import javax.enterprise.inject.Any; +import javax.faces.context.FacesContext; 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.contact.AddressbookContactWebSessionController; import org.mxchange.addressbook.beans.user.AddressbookAdminUserWebRequestController; import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController; @@ -46,7 +48,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; */ @Named ("registerController") @SessionScoped -public class AddressbookUserRegisterWebSessionBean implements AddressbookUserRegisterWebSessionController { +public class AddressbookUserRegisterWebSessionBean extends BaseAddressbookController implements AddressbookUserRegisterWebSessionController { /** * Serial number @@ -100,14 +102,14 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg } @Override - public String doRegister () { + public String doFinishRegistration () { // Get user instance User user = this.userController.createUserInstance(); // Is the user already used? if (null == user) { // user must be set - throw new NullPointerException("user is null"); //NOI18N + throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N } else if (!this.userController.isRequiredPersonalDataSet()) { // Not all required fields are set throw new FaceletException("Not all required fields are set."); //NOI18N @@ -131,8 +133,14 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg // Set it here user.setUserEncryptedPassword(encryptedPassword); - // For debugging/programming only: - user.setUserAccountStatus(UserAccountStatus.CONFIRMED); + // Is developer mode? + if (this.isDebugModeEnabled("register")) { //NOI18N + // For debugging/programming only: + user.setUserAccountStatus(UserAccountStatus.CONFIRMED); + } else { + // No debugging of this part + user.setUserAccountStatus(UserAccountStatus.UNCONFIRMED); + } try { // Call bean @@ -152,4 +160,34 @@ public class AddressbookUserRegisterWebSessionBean implements AddressbookUserReg } } + @Override + public String doRegisterMultiPage1 () { + // Now only redirect to next page as the JSF does it + return "register_page2"; //NOI18N + } + + @Override + public boolean isMultiplePageEnabled () { + // Get context parameter + String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_multi_register_page"); //NOI18N + + // Is it set? + boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N + + // Return value + return isEnabled; + } + + @Override + public boolean isResendConfirmationLinkEnabled () { + // Get context parameter + String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_resend_confirm_link_enabled"); //NOI18N + + // Is it set? + boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N + + // Return value + return isEnabled; + } + } diff --git a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionController.java b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionController.java index eccd06dd..d076d5ae 100644 --- a/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/register/AddressbookUserRegisterWebSessionController.java @@ -31,5 +31,29 @@ public interface AddressbookUserRegisterWebSessionController extends Serializabl *

* @return Redirection target */ - String doRegister (); + String doFinishRegistration (); + + /** + * Handles registration request send from first page. The (maybe) entered + * user name and email address is not used and that privacy and T&C are + * accepted. + *

+ * @return Redirect + */ + String doRegisterMultiPage1 (); + + /** + * Checks wether multi-page or single-page registration is active + *

+ * @return Whether multi (true) or single page (false) is active + */ + boolean isMultiplePageEnabled (); + + /** + * Checks whether the "resend confirmation link" feature is enabled + *

+ * @return Whether "resend confirmation link" is enabled + */ + boolean isResendConfirmationLinkEnabled (); + } diff --git a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java index e0706b73..75a37829 100644 --- a/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/shares/AddressbookSharesWebSessionBean.java @@ -31,6 +31,7 @@ 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.login.AddressbookUserLoginWebSessionController; import org.mxchange.addressbook.model.shared.SharedAddressbooksSessionBeanRemote; import org.mxchange.jaddressbookcore.events.sharing.AddressbookSharingEvent; @@ -50,7 +51,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; */ @Named (value = "shareController") @SessionScoped -public class AddressbookSharesWebSessionBean implements AddressbookSharesWebSessionController { +public class AddressbookSharesWebSessionBean extends BaseAddressbookController implements AddressbookSharesWebSessionController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java index ed1958c5..5273cf87 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.java @@ -29,6 +29,7 @@ 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.contact.AddressbookContactWebSessionController; import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; @@ -57,7 +58,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus; */ @Named ("adminUserController") @RequestScoped -public class AddressbookAdminUserWebRequestBean implements AddressbookAdminUserWebRequestController { +public class AddressbookAdminUserWebRequestBean extends BaseAddressbookController implements AddressbookAdminUserWebRequestController { /** * Serial number diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java index 7f369991..d65e27a1 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionBean.java @@ -26,14 +26,17 @@ import javax.enterprise.context.SessionScoped; import javax.enterprise.event.Event; import javax.enterprise.event.Observes; import javax.enterprise.inject.Any; +import javax.faces.context.FacesContext; 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.contact.AddressbookContactWebSessionController; import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController; +import org.mxchange.addressbook.beans.register.AddressbookUserRegisterWebSessionController; import org.mxchange.jcontacts.contact.Contact; import org.mxchange.jcontacts.contact.ContactSessionBeanRemote; import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent; @@ -48,6 +51,7 @@ import org.mxchange.jusercore.exceptions.UserPasswordMismatchException; import org.mxchange.jusercore.model.user.LoginUser; import org.mxchange.jusercore.model.user.User; import org.mxchange.jusercore.model.user.UserSessionBeanRemote; +import org.mxchange.jusercore.model.user.UserUtils; import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; /** @@ -57,7 +61,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode; */ @Named ("userController") @SessionScoped -public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionController { +public class AddressbookUserWebSessionBean extends BaseAddressbookController implements AddressbookUserWebSessionController { /** * Serial number @@ -81,6 +85,12 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC @Inject private AddressbookUserLoginWebSessionController loginController; + /** + * Registration controller + */ + @Inject + private AddressbookUserRegisterWebSessionController registerController; + /** * A list of all selectable contacts */ @@ -170,7 +180,7 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC if (null == event) { // Throw NPE throw new NullPointerException("event is null"); //NOI18N - } else if (event.getAddedContact()== null) { + } else if (event.getAddedContact() == null) { // Throw again ... throw new NullPointerException("event.addedContact is null"); //NOI18N } else if (event.getAddedContact().getContactId() == null) { @@ -372,7 +382,24 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC // Create new user instance User localUser = new LoginUser(); - // Update all data ... + // Is user name required? + if (!this.isUserNameRequired()) { + // Generate pseudo-random user name + String randomName = this.userBean.generateRandomUserName(); + + // Set it and inivisible profile + this.setUserName(randomName); + this.setUserProfileMode(ProfileMode.INVISIBLE); + + // Generate random password + String randomPassword = UserUtils.createRandomPassword(AddressbookUserWebSessionController.MINIMUM_PASSWORD_LENGTH); + + // Set random password + this.setUserPassword(randomPassword); + this.setUserPasswordRepeat(randomPassword); + } + + // Set user name and mode localUser.setUserName(this.getUserName()); localUser.setUserProfileMode(this.getUserProfileMode()); @@ -607,6 +634,24 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC return isFound; } + @Override + public boolean isPublicUserProfileEnabled () { + // Get context parameter + String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_public_profile_enabled"); //NOI18N + + // Is it set? + boolean isPublicUserProfileEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N + + // This requires user names being enabled, too. + if ((isPublicUserProfileEnabled) && (!this.isUserNameRequired())) { + // Not valid state, users must be able to modify their profile, especially when it is public + throw new IllegalStateException("Public user profiles are enabled but user name requirement is disabled, this is not possible."); //NOI18N + } + + // Return value + return isPublicUserProfileEnabled; + } + @Override public boolean isRequiredChangePersonalDataSet () { return ((this.getUserProfileMode() != null) && @@ -616,11 +661,17 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC @Override public boolean isRequiredPersonalDataSet () { - return ((this.getUserName() != null) && - (this.getUserProfileMode() != null) && - (this.contactController.isRequiredPersonalDataSet()) && - (this.getUserPassword() != null) && - (this.getUserPasswordRepeat() != null)); + if (this.registerController.isMultiplePageEnabled()) { + // Multiple registration page + return this.contactController.isRequiredPersonalDataSet(); + } else { + // Single registration page + return (((this.getUserName() != null) || (!this.isUserNameRequired())) && + (this.getUserProfileMode() != null) && + (this.contactController.isRequiredPersonalDataSet()) && + (this.getUserPassword() != null) && + (this.getUserPasswordRepeat() != null)); + } } @Override @@ -638,6 +689,18 @@ public class AddressbookUserWebSessionBean implements AddressbookUserWebSessionC return ((this.userNameList instanceof List) && (this.userNameList.contains(user.getUserName()))); } + @Override + public boolean isUserNameRequired () { + // Get context parameter + String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_user_name_required"); //NOI18N + + // Is it set? + boolean isUserNameRequired = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N + + // Return value + return isUserNameRequired; + } + @Override public boolean isVisibleUserFound () { return ((this.visibleUserList instanceof List) && (this.visibleUserList.size() > 0)); diff --git a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java index c5eb1ade..91503895 100644 --- a/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java +++ b/src/java/org/mxchange/addressbook/beans/user/AddressbookUserWebSessionController.java @@ -41,6 +41,14 @@ public interface AddressbookUserWebSessionController extends Serializable { */ public static final Integer MINIMUM_PASSWORD_LENGTH = 5; + /** + * Observes events being fired when an administrator has added a new + * contact. + *

+ * @param event Event being fired + */ + void afterAdminAddedContact (final AdminAddedContactEvent event); + /** * Event observer for newly added users by adminstrator *

@@ -106,14 +114,6 @@ public interface AddressbookUserWebSessionController extends Serializable { */ boolean isContactFound (final Contact contact); - /** - * Observes events being fired when an administrator has added a new - * contact. - *

- * @param event Event being fired - */ - void afterAdminAddedContact (final AdminAddedContactEvent event); - /** * Checks whether a public user account is registered. This means that at * least one user profile has its flag "public user profile" enabled. @@ -271,4 +271,20 @@ public interface AddressbookUserWebSessionController extends Serializable { */ String doChangePersonalData (); + /** + * Checks whether this application requires a user name to be entered. + * Otherwise a random name like "userXXXXX" is generated + *

+ * @return Whether this application requires a user name + */ + boolean isUserNameRequired (); + + /** + * Checks wether public user profiles are enabled. This requires that user + * names are also enabled. + *

+ * @return Whether public user profiles are enabled + */ + boolean isPublicUserProfileEnabled (); + } diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 3e7f5ef2..be47a1f2 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -527,3 +527,13 @@ LINK_GUEST_PRIVACY_STATEMENTS=Datenschutzbestimmungen ADMIN_ADD_OR_ENTER_CONTACT_DATA=... oder geben Sie die Kontaktdaten des Recruiters ein: ADMIN_PERSONAL_DATA_EMAIL_ADDRESS=Email-Adresse: ERROR_CONTACT_ID_NOT_FOUND=Fehler: Kontaktdaten nicht gefunden. +GUEST_REGISTRATION_PAGE1_TITLE=Anmeldeseite 1 +GUEST_REGISTRATION_PAGE2_TITLE=Anmeldeseite 2 +BUTTON_CONTINUE_REGISTER_PAGE2=Weiter zur Anmeldeseite 2 +ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED=Fehler: Mehrfach-Seite f\u00fcr Anmeldung nicht aktiv, bitte Link nicht aufrufen. +PAGE_TITLE_USER_REGISTER_PAGE2=Anmeldeseite 2 +CONTENT_TITLE_USER_REGISTER_PAGE2=Anmeldeseite 2: +ERROR_GUEST_USER_LOGIN_DEACTIVATED=Fehler: Der Benutzerbereich wurde administrativ deaktiviert (keine Benutzernamen bei Anmeldung). +ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED=Fehler: Wiederherstellen des Passwortes wurde administrativ deaktiviert. +ERROR_GUEST_USER_RESEND_CONFIRMATION_DEACTIVATED=Fehler: Erneutes Aussenden des Best\u00e4tigungslinked ist administrativ deaktiviert. +ERROR_GUEST_USER_PROFILE_DEACTIVATED=Fehler: \u00d6ffentliche Benutzerprofile sind administrativ deaktiviert. diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 2f16e330..23ff4181 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -491,3 +491,13 @@ LINK_GUEST_PRIVACY_STATEMENTS=privacy statements ADMIN_ADD_OR_ENTER_CONTACT_DATA=... or enter the recruiter's contact data: ADMIN_PERSONAL_DATA_EMAIL_ADDRESS=Email address: ERROR_CONTACT_ID_NOT_FOUND=Error: contact data not found +GUEST_REGISTRATION_PAGE1_TITLE=Registration page 1 +GUEST_REGISTRATION_PAGE2_TITLE=Registration page 2 +BUTTON_CONTINUE_REGISTER_PAGE2=Continue to registration page 2 +ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED=Error: Multiple registration page not active, please don't call this page. +PAGE_TITLE_USER_REGISTER_PAGE2=Register page 2 +CONTENT_TITLE_USER_REGISTER_PAGE2=Register page 2: +ERROR_GUEST_USER_LOGIN_DEACTIVATED=Error: User area is deactivated by administrators, no user name while registration. +ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED=Error: password recovery is deactivated by administrators. +ERROR_GUEST_USER_RESEND_CONFIRMATION_DEACTIVATED=Error: Resending confirmation link is deactivated by administrators. +ERROR_GUEST_USER_PROFILE_DEACTIVATED=Error: Public user profiles are deactivated by administrators. diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 08df41e1..b0ee8803 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -105,6 +105,10 @@ register_done /guest/user/register_done.xhtml + + register_page2 + /guest/user/register_page2.xhtml + /admin/admin_logout.xhtml diff --git a/web/WEB-INF/templates/contact/form_contact_data.tpl b/web/WEB-INF/templates/contact/form_contact_data.tpl index dd605687..55d2234c 100644 --- a/web/WEB-INF/templates/contact/form_contact_data.tpl +++ b/web/WEB-INF/templates/contact/form_contact_data.tpl @@ -188,31 +188,33 @@ -

-
- #{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}
  • -
-
-
-
-
+ +
+
+ #{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/guest_menu.tpl b/web/WEB-INF/templates/guest/guest_menu.tpl index c92679cd..be83b4a1 100644 --- a/web/WEB-INF/templates/guest/guest_menu.tpl +++ b/web/WEB-INF/templates/guest/guest_menu.tpl @@ -26,21 +26,27 @@
    -
  • - -
  • + +
  • + +
  • +
  • -
  • - -
  • - -
  • - -
  • + +
  • + +
  • +
    + + +
  • + +
  • +
diff --git a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl index e4b3f398..385dfc85 100644 --- a/web/WEB-INF/templates/guest/guest_privacy_terms.tpl +++ b/web/WEB-INF/templates/guest/guest_privacy_terms.tpl @@ -34,7 +34,7 @@
#{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_1} - + #{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_2}
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 c95a7639..c9020630 100644 --- a/web/WEB-INF/templates/guest/user/guest_registration_form.tpl +++ b/web/WEB-INF/templates/guest/user/guest_registration_form.tpl @@ -5,11 +5,10 @@ xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - +
- #{msg.GUEST_REGISTRATION_TITLE} + #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
@@ -90,7 +89,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 index 55c2ebdd..a1c7223d 100644 --- 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 @@ -6,29 +6,29 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - +
- #{msg.GUEST_REGISTRATION_TITLE} + #{msg.GUEST_REGISTRATION_PAGE1_TITLE}
- -
#{msg.GUEST_REGISTRATION_EMAIL_LEGEND} -
-
- -
+ +
+
+ +
-
- -
+
+ +
-
-
+
+
+
@@ -54,35 +54,37 @@
-
+ +
-
-
- -
+
+
+ +
-
- +
+ +
+ +
-
-
+
+
+ +
-
-
- -
+
+ +
-
- +
-
-
- -
- #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE} -
+
+ #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE} +
+
@@ -90,7 +92,7 @@
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 new file mode 100644 index 00000000..d4e1e9d8 --- /dev/null +++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl @@ -0,0 +1,100 @@ + + + + +
+
+ #{msg.GUEST_REGISTRATION_TITLE} +
+ + + +
+
+ #{msg.GUEST_REGISTRATION_EMAIL_LEGEND} + + +
+
+ +
+ +
+ +
+ +
+
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ + +
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+
+ +
+ +
+ +
+ +
+
+ +
+ #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE} +
+
+
+
+ + + + +
+
+
diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index 0122fc6e..07d90b9f 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -3,8 +3,29 @@ An online address book application to share private and business memebers between all members. It is also possible that the user's profile can be made visible to outside. Addressbook Application v1.0 - javax.faces.PROJECT_STAGE - Development + Whether debug mode is for registration controller enabled. + is_debug_register_enabled + false + + + Whether the multi-page registration page or a single registration page is active + is_multi_register_page + true + + + Whether a user name is required on registration + is_user_name_required + false + + + Whether the public user profile is enabled. + is_public_profile_enabled + false + + + Whether "resend confirmation link" ius enabled. + is_resend_confirm_link_enabled + false Faces Servlet diff --git a/web/guest/user/login.xhtml b/web/guest/user/login.xhtml index e52d2790..6025cb04 100644 --- a/web/guest/user/login.xhtml +++ b/web/guest/user/login.xhtml @@ -3,10 +3,10 @@ + 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_USER_LOGIN} @@ -16,18 +16,24 @@ -
- - Noch kein Benutzerkonto? Einfach hier anmelden. -
+ +
+ + Noch kein Benutzerkonto? Einfach hier anmelden. +
-
- -
+
+ +
-
- -
+
+ +
+
+ + + +
diff --git a/web/guest/user/lost_passwd.xhtml b/web/guest/user/lost_passwd.xhtml index 103e070c..376a421f 100644 --- a/web/guest/user/lost_passwd.xhtml +++ b/web/guest/user/lost_passwd.xhtml @@ -16,53 +16,59 @@ -
- -
-
- #{msg.GUEST_LOST_PASSWORD_TITLE} -
+ +
+ +
+
+ #{msg.GUEST_LOST_PASSWORD_TITLE} +
-
- #{msg.GUEST_LOST_PASSWORD_LEGEND} +
+ #{msg.GUEST_LOST_PASSWORD_LEGEND} -
-
- +
+
+ +
+ +
+ +
+ +
-
- +
+ #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL}
-
-
+
+
+ +
-
- #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL} -
+
+ +
-
-
- +
-
- -
+
-
+ - -
- - -
-
-
+ +
+ + + + + diff --git a/web/guest/user/register.xhtml b/web/guest/user/register.xhtml index ab0f9104..e8546fec 100644 --- a/web/guest/user/register.xhtml +++ b/web/guest/user/register.xhtml @@ -3,10 +3,10 @@ + 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_USER_REGISTER} @@ -16,14 +16,22 @@ -
- #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1} - - #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2} -
+ +
+ #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1} + + #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2} +
+
- + + + + + + +
diff --git a/web/guest/user/register_page2.xhtml b/web/guest/user/register_page2.xhtml new file mode 100644 index 00000000..04b7ccd2 --- /dev/null +++ b/web/guest/user/register_page2.xhtml @@ -0,0 +1,38 @@ + + + + + + #{msg.PAGE_TITLE_USER_REGISTER_PAGE2} + + + #{msg.CONTENT_TITLE_USER_REGISTER_PAGE2} + + + + + +
+ #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1} + + #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2} +
+
+ +
+ +
+
+ + + + +
+
+ diff --git a/web/guest/user/resend_link.xhtml b/web/guest/user/resend_link.xhtml index 89da7508..4c619697 100644 --- a/web/guest/user/resend_link.xhtml +++ b/web/guest/user/resend_link.xhtml @@ -16,7 +16,13 @@ - Here goes your content. + + Here goes your content. + + + + + diff --git a/web/guest/user/user_profile.xhtml b/web/guest/user/user_profile.xhtml index ef63b6f7..48733452 100644 --- a/web/guest/user/user_profile.xhtml +++ b/web/guest/user/user_profile.xhtml @@ -24,22 +24,28 @@ - - - + + + + + + + #{msg.ERROR_PROFILE_NOT_VISIBLE} + - - #{msg.ERROR_PROFILE_NOT_VISIBLE} + +
+ + + #{msg.PUBLIC_USER_PROFILE} + + +
+
- -
- - - #{msg.PUBLIC_USER_PROFILE} - - -
+ +