]> git.mxchange.org Git - jjobs-war.git/commitdiff
Rewritten a lot:
authorRoland Häder <roland@mxchange.org>
Thu, 12 May 2016 16:18:23 +0000 (18:18 +0200)
committerRoland Haeder <roland@mxchange.org>
Sat, 14 May 2016 13:04:10 +0000 (15:04 +0200)
- 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 Base<project-name>Controller 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 <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
37 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/BaseJobsController.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/addressbook/JobsAddressbookWebSessionBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java
src/java/org/mxchange/jjobs/beans/country/JobsCountryWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/email_address/JobsEmailChangeWebSessionBean.java
src/java/org/mxchange/jjobs/beans/gender/JobsGenderWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/localization/JobsLocalizationSessionBean.java
src/java/org/mxchange/jjobs/beans/login/JobsUserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsMobileProviderWebRequestBean.java
src/java/org/mxchange/jjobs/beans/phone/JobsAdminContactPhoneWebSessionBean.java
src/java/org/mxchange/jjobs/beans/profile/JobsUserProfileWebRequestBean.java
src/java/org/mxchange/jjobs/beans/profilemode/JobsProfileModeWebApplicationBean.java
src/java/org/mxchange/jjobs/beans/register/JobsUserRegisterWebSessionBean.java
src/java/org/mxchange/jjobs/beans/register/JobsUserRegisterWebSessionController.java
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionBean.java
src/java/org/mxchange/jjobs/beans/user/JobsUserWebSessionController.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/contact/form_contact_data.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/WEB-INF/templates/guest/guest_privacy_terms.tpl
web/WEB-INF/templates/guest/user/guest_registration_form.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl [new file with mode: 0644]
web/WEB-INF/web.xml
web/guest/user/login.xhtml
web/guest/user/lost_passwd.xhtml
web/guest/user/register.xhtml
web/guest/user/register_page2.xhtml [new file with mode: 0644]
web/guest/user/resend_link.xhtml
web/guest/user/user_profile.xhtml

index 7d96751555d85f100415330985d5b298f29af130..b23240145df01969cfd8e28298438365db4cb010 100644 (file)
@@ -2,61 +2,61 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="privacy.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="guest/user/show_addressbook.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="admin/index.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="user/login_own_addressbooks.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="guest/recruiter/login.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="user/login_user_data_saved.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="user/login_data_saved.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="guest/user/user_list.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="index.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="user/login_edit_user_data.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="*" x="900" y="150" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="user/login_index.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="guest/user/lost_passwd.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="guest/user/register_done.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="guest/user/show_addressbook_entries.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="guest/user/login_error.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="user/login_change_password.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="guest/user/user_profile.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="exception.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="terms.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="user/login_change_personal_data.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="privacy.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="guest/user/show_addressbook.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/index.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="user/login_own_addressbooks.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="user/login_user_data_saved.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/login_data_saved.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="guest/user/user_list.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="index.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="user/login_edit_user_data.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="*" x="1650" y="150" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="user/login_index.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="guest/user/lost_passwd.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="guest/user/register_done.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="guest/user/show_addressbook_entries.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="guest/user/login_error.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="user/login_change_password.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="guest/user/user_profile.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="exception.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="guest/user/register_page2.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="terms.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/login_change_personal_data.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="logout.xhtml" x="150" y="900" zoom="true"/>
         <Node id="admin/country/admin_country_edit.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="logout.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="guest/user/resend_link.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="user/login_add_addressbook.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="user/login_contact_data_saved.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="imprint.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="guest/user/login.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="guest/user/register.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="user/login_change_email_address.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="user/login/login_data_saved.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="user/login_add_addressbook.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="guest/user/resend_link.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="user/login_contact_data_saved.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="imprint.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="guest/user/login.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="guest/user/register.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="user/login_change_email_address.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="user/login/login_data_saved.xhtml" x="400" y="450" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
diff --git a/src/java/org/mxchange/jjobs/beans/BaseJobsController.java b/src/java/org/mxchange/jjobs/beans/BaseJobsController.java
new file mode 100644 (file)
index 0000000..6e67552
--- /dev/null
@@ -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 <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans;
+
+import java.io.Serializable;
+import javax.faces.context.FacesContext;
+
+/**
+ * A general controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public abstract class BaseJobsController implements Serializable {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 50_837_597_127_567_140L;
+
+       /**
+        * Checks whether debug mode is enabled for given controller
+        * <p>
+        * @param controllerName Name of controller
+        * <p>
+        * @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;
+       }
+
+}
index 2077651e0a418a70b7945b84361718f57d77326a..d6a66937771fa4f307e5aae6ec4b411018a45047 100644 (file)
@@ -52,7 +52,7 @@ import org.mxchange.jusercore.model.user.User;
  */
 @Named ("addressbookController")
 @SessionScoped
-public class JobsAddressbookWebSessionBean implements JobsAddressbookWebSessionController {
+public class JobsAddressbookWebSessionBean extends BaseJobsController implements JobsAddressbookWebSessionController {
 
        /**
         * Serial number
index 48d8e53f186b3494a1bbb9217972decbb2258b60..26c6baa526cd1a655bfa856b14f8f57d06f8b5fa 100644 (file)
@@ -40,6 +40,7 @@ import org.mxchange.jcontacts.events.contact.update.AdminContactUpdatedEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.exceptions.ContactAlreadyAddedException;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.helper.JobsAdminWebRequestController;
 import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
@@ -56,7 +57,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
  */
 @Named ("adminContactController")
 @RequestScoped
-public class JobsAdminContactWebRequestBean implements JobsAdminContactWebRequestController {
+public class JobsAdminContactWebRequestBean extends BaseJobsController implements JobsAdminContactWebRequestController {
 
        /**
         * Serial number
index 8ffe2a92e5f05fc3533cef7e1359b63393d0f2c7..1e4b4a689c163076e6447c4844accaaf7970aaa5 100644 (file)
@@ -40,6 +40,7 @@ import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
 import org.mxchange.jcontacts.events.contact.update.AdminUpdatedContactEvent;
 import org.mxchange.jcontacts.exceptions.ContactNotFoundException;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
 import org.mxchange.jphone.phonenumbers.cellphone.CellphoneNumber;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
@@ -60,7 +61,7 @@ import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
  */
 @Named ("contactController")
 @SessionScoped
-public class JobsContactWebSessionBean implements JobsContactWebSessionController {
+public class JobsContactWebSessionBean extends BaseJobsController implements JobsContactWebSessionController {
 
        /**
         * Serial number
index ed3beb6d27956f175a024115167fc1bd8b0d9b1c..51eb57e056865df8cdd1630ef737dd39f65b0b77 100644 (file)
@@ -34,6 +34,7 @@ import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
 import org.mxchange.jcountry.events.AdminAddedCountryEvent;
 import org.mxchange.jcountry.events.AdminEventCountryAdded;
 import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
+import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
  * An administrative country bean
@@ -42,7 +43,7 @@ import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException;
  */
 @Named ("adminCountryController")
 @RequestScoped
-public class JobsAdminCountryWebRequestBean implements JobsAdminCountryWebRequestController {
+public class JobsAdminCountryWebRequestBean extends BaseJobsController implements JobsAdminCountryWebRequestController {
 
        /**
         * Serial number
index 51c68b099ef64af0edb3690351e9d8a8c4007ef5..fbeb7f51c77339f60c4961e36832bf8e3c25c5df 100644 (file)
@@ -30,6 +30,7 @@ import javax.naming.NamingException;
 import org.mxchange.jcountry.data.Country;
 import org.mxchange.jcountry.data.CountrySingletonBeanRemote;
 import org.mxchange.jcountry.events.AdminAddedCountryEvent;
+import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
  * A country bean
@@ -38,7 +39,7 @@ import org.mxchange.jcountry.events.AdminAddedCountryEvent;
  */
 @Named ("country")
 @ApplicationScoped
-public class JobsCountryWebApplicationBean implements JobsCountryWebApplicationController {
+public class JobsCountryWebApplicationBean extends BaseJobsController implements JobsCountryWebApplicationController {
 
        /**
         * Serial number
index 12073af3a93c357764aecc9215665d8c9a022431..c30ee111de3c0c017f1b4e54497c83a4b168e1e0 100644 (file)
@@ -27,6 +27,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
 import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
 import org.mxchange.jusercore.model.email_address.ChangeableEmailAddress;
@@ -41,7 +42,7 @@ import org.mxchange.jusercore.model.user.User;
  */
 @Named ("emailChangeController")
 @SessionScoped
-public class JobsEmailChangeWebSessionBean implements JobsEmailChangeWebSessionController {
+public class JobsEmailChangeWebSessionBean extends BaseJobsController implements JobsEmailChangeWebSessionController {
 
        /**
         * Serial number
index ea823c86983799a863c3754c4f6a7d9a40ba785b..ba6976d913cc06cdb98bfb9e7cb855c464a3617f 100644 (file)
@@ -21,6 +21,7 @@ import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
 import org.mxchange.jcontacts.contact.gender.Gender;
 import org.mxchange.jcontacts.contact.gender.GenderUtils;
+import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
  * A gender bean
@@ -29,7 +30,7 @@ import org.mxchange.jcontacts.contact.gender.GenderUtils;
  */
 @Named ("gender")
 @ApplicationScoped
-public class JobsGenderWebApplicationBean implements JobsGenderWebApplicationController {
+public class JobsGenderWebApplicationBean extends BaseJobsController implements JobsGenderWebApplicationController {
 
        /**
         * Serial number
index 1fcc2bbd5dd3e55f141e895c76a673618018812f..6219df0cd58293126d34bb52f4ece77a1537ac22 100644 (file)
@@ -21,7 +21,7 @@ import javax.annotation.PostConstruct;
 import javax.enterprise.context.SessionScoped;
 import javax.faces.context.FacesContext;
 import javax.inject.Named;
-import org.mxchange.jcoreee.database.BaseDatabaseBean;
+import org.mxchange.jjobs.beans.BaseJobsController;
 
 /**
  * A session bean for handling localization/internationalization changes. This
@@ -33,7 +33,7 @@ import org.mxchange.jcoreee.database.BaseDatabaseBean;
  */
 @Named ("localizationController")
 @SessionScoped
-public class JobsLocalizationSessionBean extends BaseDatabaseBean implements JobsLocalizationSessionController {
+public class JobsLocalizationSessionBean extends BaseJobsController implements JobsLocalizationSessionController {
 
        /**
         * Serial number
index e79a0f794718b450f9beba580b936873b0d083dc..51ade0eac9fe4a8632ad13d59f990002891d741e 100644 (file)
@@ -26,6 +26,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jusercore.container.login.LoginContainer;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
@@ -48,7 +49,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  */
 @Named ("loginController")
 @SessionScoped
-public class JobsUserLoginWebSessionBean implements JobsUserLoginWebSessionController {
+public class JobsUserLoginWebSessionBean extends BaseJobsController implements JobsUserLoginWebSessionController {
 
        /**
         * Serial number
index bba213d5e1bd83af8d9d84d273930c7d78ad478a..c9a178a06c6d904004611ab68de5b1e6b9f39090 100644 (file)
@@ -29,6 +29,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcountry.data.Country;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.events.AdminAddedMobileProviderEvent;
 import org.mxchange.jphone.events.AdminMobileProviderAddedEvent;
 import org.mxchange.jphone.exceptions.MobileProviderAlreadyAddedException;
@@ -43,7 +44,7 @@ import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
  */
 @Named ("adminMobileProviderController")
 @RequestScoped
-public class JobsAdminMobileProviderWebRequestBean implements JobsAdminMobileProviderWebRequestController {
+public class JobsAdminMobileProviderWebRequestBean extends BaseJobsController implements JobsAdminMobileProviderWebRequestController {
 
        /**
         * Serial number
index affcf1fe6b36194f14a69e99720b22bb31979e78..c7ecd4b9adffdd9f8642f9160a147a31300f3353 100644 (file)
@@ -27,6 +27,7 @@ import javax.inject.Named;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import org.mxchange.jjobs.beans.BaseJobsController;
 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 JobsMobileProviderWebRequestBean implements JobsMobileProviderWebRequestController {
+public class JobsMobileProviderWebRequestBean extends BaseJobsController implements JobsMobileProviderWebRequestController {
 
        /**
         * Serial number
index e21d24495c9c495c39a75476aba1f940af683059..ded322325abb24c9ce8c4e789dbd09132894f26f 100644 (file)
@@ -27,6 +27,7 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.phone.AdminContactsPhoneSessionBeanRemote;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jphone.phonenumbers.cellphone.DialableCellphoneNumber;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
@@ -38,7 +39,7 @@ import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
  */
 @Named ("adminContactPhoneController")
 @RequestScoped
-public class JobsAdminContactPhoneWebSessionBean implements JobsAdminContactPhoneWebSessionController {
+public class JobsAdminContactPhoneWebSessionBean extends BaseJobsController implements JobsAdminContactPhoneWebSessionController {
 
        /**
         * Serial number
index 84c9cf6b2127c5e634a253453da8d6682be19bbf..148b9e89e6cbe90345750717470670893fd7834a 100644 (file)
@@ -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.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
 import org.mxchange.jusercore.exceptions.UserNotFoundException;
@@ -34,7 +35,7 @@ import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
  */
 @Named (value = "profileController")
 @RequestScoped
-public class JobsUserProfileWebRequestBean implements JobsUserProfileWebRequestController {
+public class JobsUserProfileWebRequestBean extends BaseJobsController implements JobsUserProfileWebRequestController {
 
        /**
         * Serial number
@@ -56,24 +57,24 @@ public class JobsUserProfileWebRequestBean implements JobsUserProfileWebRequestC
        @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
index c5b8926d04d007bf3be9e89af68fa84f6a6276a9..204e418cef30b3ee531582a56c52085c824bf1c6 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.jjobs.beans.profilemode;
 
 import javax.enterprise.context.ApplicationScoped;
 import javax.inject.Named;
+import org.mxchange.jjobs.beans.BaseJobsController;
 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 JobsProfileModeWebApplicationBean implements JobsProfileModeWebApplicationController {
+public class JobsProfileModeWebApplicationBean extends BaseJobsController implements JobsProfileModeWebApplicationController {
 
        /**
         * Serial number
index 054ea6b21da6f6ad935722b31ff9d5853a88f553..bb715862e9b5582852d1e52a6620167559041cc9 100644 (file)
@@ -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.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
 import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController;
 import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
@@ -46,7 +48,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  */
 @Named ("registerController")
 @SessionScoped
-public class JobsUserRegisterWebSessionBean implements JobsUserRegisterWebSessionController {
+public class JobsUserRegisterWebSessionBean extends BaseJobsController implements JobsUserRegisterWebSessionController {
 
        /**
         * Serial number
@@ -100,14 +102,14 @@ public class JobsUserRegisterWebSessionBean implements JobsUserRegisterWebSessio
        }
 
        @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 JobsUserRegisterWebSessionBean implements JobsUserRegisterWebSessio
                // 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 JobsUserRegisterWebSessionBean implements JobsUserRegisterWebSessio
                }
        }
 
+       @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;
+       }
+
 }
index 209999b105bb9380d3ad11efe9120715b2855065..600149f81b90ee305f675a315dd3089cfbf82ea1 100644 (file)
@@ -31,6 +31,29 @@ public interface JobsUserRegisterWebSessionController extends Serializable {
         * <p>
         * @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.
+        * <p>
+        * @return Redirect
+        */
+       String doRegisterMultiPage1 ();
+
+       /**
+        * Checks wether multi-page or single-page registration is active
+        * <p>
+        * @return Whether multi (true) or single page (false) is active
+        */
+       boolean isMultiplePageEnabled ();
+
+       /**
+        * Checks whether the "resend confirmation link" feature is enabled
+        * <p>
+        * @return Whether "resend confirmation link" is enabled
+        */
+       boolean isResendConfirmationLinkEnabled ();
 
 }
index 3420216ce334ecce881b9f8973f8f1e012461ad0..b4259c1f5f0e0452db8699af3c2e237345afff54 100644 (file)
@@ -30,6 +30,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
 import org.mxchange.jjobs.beans.helper.JobsAdminWebRequestController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
@@ -56,7 +57,7 @@ import org.mxchange.jusercore.model.user.status.UserAccountStatus;
  */
 @Named ("adminUserController")
 @RequestScoped
-public class JobsAdminUserWebRequestBean implements JobsAdminUserWebRequestController {
+public class JobsAdminUserWebRequestBean extends BaseJobsController implements JobsAdminUserWebRequestController {
 
        /**
         * Serial number
index 00472ce38980ca8f8f69c84268d11bdde9f97e19..eb4e781f6b5a3084bf89032a8d5a5480e9e7c7df 100644 (file)
@@ -26,6 +26,7 @@ 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;
@@ -35,8 +36,10 @@ import javax.naming.NamingException;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
+import org.mxchange.jjobs.beans.BaseJobsController;
 import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
 import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
+import org.mxchange.jjobs.beans.register.JobsUserRegisterWebSessionController;
 import org.mxchange.jusercore.events.login.UserLoggedInEvent;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -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 JobsUserWebSessionBean implements JobsUserWebSessionController {
+public class JobsUserWebSessionBean extends BaseJobsController implements JobsUserWebSessionController {
 
        /**
         * Serial number
@@ -75,6 +79,12 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
        @Inject
        private JobsContactWebSessionController contactController;
 
+       /**
+        * Registration controller
+        */
+       @Inject
+       private JobsUserRegisterWebSessionController registerController;
+
        /**
         * A list of all selectable contacts
         */
@@ -164,7 +174,7 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                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) {
@@ -367,7 +377,24 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                // 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(JobsUserWebSessionController.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());
 
@@ -602,6 +629,24 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                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) &&
@@ -611,11 +656,17 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
 
        @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
@@ -633,6 +684,18 @@ public class JobsUserWebSessionBean implements JobsUserWebSessionController {
                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));
index ddb7d4e996d3167ba9f509664de66f38d5957f71..8f5168eda00af0ee1f0fc72b8aab2311980c68ef 100644 (file)
@@ -41,6 +41,14 @@ public interface JobsUserWebSessionController extends Serializable {
         */
        public static final Integer MINIMUM_PASSWORD_LENGTH = 5;
 
+       /**
+        * Observes events being fired when an administrator has added a new
+        * contact.
+        * <p>
+        * @param event Event being fired
+        */
+       void afterAdminAddedContact (final AdminAddedContactEvent event);
+
        /**
         * Event observer for newly added users by adminstrator
         * <p>
@@ -271,4 +279,20 @@ public interface JobsUserWebSessionController extends Serializable {
         */
        String doChangePersonalData ();
 
+       /**
+        * Checks whether this application requires a user name to be entered.
+        * Otherwise a random name like "userXXXXX" is generated
+        * <p>
+        * @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.
+        * <p>
+        * @return Whether public user profiles are enabled
+        */
+       boolean isPublicUserProfileEnabled ();
+
 }
index 3d0ae6569446cfac4dfef27f81ccd3ec7b476ec0..2046b20525491643fcfffcb7375d6e1edb53a65e 100644 (file)
@@ -483,3 +483,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.
index 840e86567658aa54c4f8f0d779317df170db5d0d..6d375349283ef845baa5d3d0d106deae84734434 100644 (file)
@@ -460,3 +460,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.
index 5468e5f7950b9b356733aa6d31dc11b1d6d8be43..8fd39c82602a1f767d4bbf9e0522dd85413972b0 100644 (file)
                        <from-outcome>register_done</from-outcome>
                        <to-view-id>/guest/user/register_done.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>register_page2</from-outcome>
+                       <to-view-id>/guest/user/register_page2.xhtml</to-view-id>
+               </navigation-case>
        </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/admin_logout.xhtml</from-view-id>
index dd60568754f6b5b16144cd2d5361b584bc0e9b34..55d2234c5aa601718b89bdd488970a93e7458f0e 100644 (file)
                </fieldset>
        </div>
 
-       <div class="para">
-               <fieldset id="user_profile">
-                       <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}">#{msg.USER_PROFILE_LEGEND}</legend>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/profile_mode_selection_box.tpl" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="para notice">
-                                       <ul>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}</li>
-                                       </ul>
-                               </div>
-                       </div>
-               </fieldset>
-       </div>
+       <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
+               <div class="para">
+                       <fieldset id="user_profile">
+                               <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}">#{msg.USER_PROFILE_LEGEND}</legend>
+
+                               <div class="table_row">
+                                       <div class="table_left">
+                                               <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
+                                       </div>
+
+                                       <div class="table_right">
+                                               <ui:include src="/WEB-INF/templates/generic/profile_mode_selection_box.tpl" />
+                                       </div>
+
+                                       <div class="clear"></div>
+                               </div>
+
+                               <div class="table_row">
+                                       <div class="para notice">
+                                               <ul>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}</li>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}</li>
+                                                       <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}</li>
+                                               </ul>
+                                       </div>
+                               </div>
+                       </fieldset>
+               </div>
+       </ui:fragment>
 </ui:composition>
index c92679cdef2ac52299fbcad925dfcdbfd139e708..1830569927b975c9fed06a58f164676d3a1618a1 100644 (file)
                        </div>
 
                        <ul>
-                               <li>
-                                       <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
-                               </li>
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
+                                       </li>
+                               </ui:fragment>
 
                                <li>
                                        <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
                                </li>
 
+<<<<<<< HEAD
                                <li>
                                        <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
                                </li>
                                <li>
                                        <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
                                </li>
+=======
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
+                                       </li>
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
+                                       </li>
+                               </ui:fragment>
+>>>>>>> 4a789c7... Rewritten a lot:
                        </ul>
                </div>
        </div>
index e4b3f3981a8233d151305ea4ac12d5396828c37b..385dfc850f6529318e74558eb1a05c6f2b83c943 100644 (file)
@@ -34,7 +34,7 @@
 
                                <div class="table_right75">
                                        #{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_1}
-                                       <h:link outcome="terms" target="_blank" value="#{msg.TERMS_CONDITIONS}" />
+                                       <h:link outcome="terms" target="_blank" value="#{msg.LINK_GUEST_TERMS_CONDITIONS}" />
                                        #{msg.GUEST_AGREE_READ_TERMS_CONDITIONS_2}
                                </div>
 
index c95a7639d70077ef6834b5382f5cbd0a0fe24d1d..c9020630f08cafcae878d2aae5c843f868edaf5a 100644 (file)
@@ -5,11 +5,10 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-
-       <h:form id="register_form">
+       <h:form id="register_page2_form">
                <div class="table">
                        <div class="table_header">
-                               #{msg.GUEST_REGISTRATION_TITLE}
+                               #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
                        </div>
 
                        <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
@@ -90,7 +89,7 @@
 
                        <div class="table_footer">
                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doRegister()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
                        </div>
                </div>
        </h:form>
index 55c2ebddbcf300b6eef94bb33d747771062cbd0d..a1c7223d913add429e17bb712700531da80afb93 100644 (file)
@@ -6,29 +6,29 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
 
-       <h:form id="register_form">
+       <h:form id="register_page1_form">
                <div class="table">
                        <div class="table_header">
-                               #{msg.GUEST_REGISTRATION_TITLE}
+                               #{msg.GUEST_REGISTRATION_PAGE1_TITLE}
                        </div>
 
-                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
-
                        <div class="para">
                                <fieldset id="login_data">
                                        <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}">#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}</legend>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
-                                               </div>
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
-                                               </div>
+                                                       <div class="table_right">
+                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                                       </div>
 
-                                               <div class="clear"></div>
-                                       </div>
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </ui:fragment>
 
                                        <div class="table_row">
                                                <div class="table_left">
                                                <div class="clear"></div>
                                        </div>
 
-                                       <div class="para"></div>
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="para"></div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
-                                               </div>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
                                                </div>
 
-                                               <div class="clear"></div>
-                                       </div>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                       </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
-                                               </div>
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       </div>
 
-                                               <div class="table_right">
-                                                       <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       <div class="clear"></div>
                                                </div>
 
-                                               <div class="clear"></div>
-                                       </div>
-
-                                       <div class="para notice">
-                                               #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
-                                       </div>
+                                               <div class="para notice">
+                                                       #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
+                                               </div>
+                                       </ui:fragment>
                                </fieldset>
                        </div>
 
@@ -90,7 +92,7 @@
 
                        <div class="table_footer">
                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doRegister()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="continueRegisterPage1" value="#{msg.BUTTON_CONTINUE_REGISTER_PAGE2}" action="#{registerController.doRegisterMultiPage1()}" />
                        </div>
                </div>
        </h:form>
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 (file)
index 0000000..d4e1e9d
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:form id="register_single_form">
+               <div class="table">
+                       <div class="table_header">
+                               #{msg.GUEST_REGISTRATION_TITLE}
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                       <div class="para">
+                               <fieldset id="login_data">
+                                       <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}">#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}</legend>
+
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+                                       </ui:fragment>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                               <div class="para"></div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="para notice">
+                                                       #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
+                                               </div>
+                                       </ui:fragment>
+                               </fieldset>
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index 0961676cc8fde9cbcbead6c7f797ba4228697dec..442f6037dab7db48b54fcda6ab0ad5befd85e2f0 100644 (file)
@@ -3,8 +3,29 @@
     <description>An application for handling and sending out applications to companies.</description>
     <display-name>JJobs v1.0</display-name>
     <context-param>
-        <param-name>javax.faces.PROJECT_STAGE</param-name>
-        <param-value>Development</param-value>
+        <description>Whether debug mode is for registration controller enabled.</description>
+        <param-name>is_debug_register_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the multi-page registration page or a single registration page is active</description>
+        <param-name>is_multi_register_page</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether a user name is required on registration</description>
+        <param-name>is_user_name_required</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the public user profile is enabled.</description>
+        <param-name>is_public_profile_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether "resend confirmation link" ius enabled.</description>
+        <param-name>is_resend_confirm_link_enabled</param-name>
+        <param-value>false</param-value>
     </context-param>
     <servlet>
         <servlet-name>Faces Servlet</servlet-name>
index e52d27906ff338ae9ee0b8d9d76fee2227b2e0fa..8c7aa57dc9ba49f88df158c0cb587c73e100cde5 100644 (file)
@@ -16,6 +16,7 @@
                </ui:define>
 
                <ui:define name="content">
+<<<<<<< HEAD
                        <div class="para">
                                <!-- TODO Internatialize this somehow //-->
                                Noch kein Benutzerkonto? Einfach <h:link id="user_register" outcome="user_register" title="Als Benutzer anmelden">hier</h:link> anmelden.
                        <div class="para">
                                <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
                        </div>
+=======
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para">
+                                       <!-- TODO Internatialize this somehow //-->
+                                       Noch kein Benutzerkonto? Einfach <h:link id="user_register" outcome="user_register" title="Als Benutzer anmelden">hier</h:link> anmelden.
+                               </div>
+
+                               <div class="para">
+                                       <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" />
+                               </div>
+
+                               <div class="para">
+                                       <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" />
+                       </ui:fragment>
+>>>>>>> 4a789c7... Rewritten a lot:
                </ui:define>
        </ui:composition>
 </html>
index 103e070c322b8f85f855e70daf1af2472a37685e..376a421f02b800069019f153a27d506fed09d014 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="para" id="user_lost_password_content">
-                               <h:form id="lost_password_form">
-                                       <div class="table">
-                                               <div class="table_header">
-                                                       #{msg.GUEST_LOST_PASSWORD_TITLE}
-                                               </div>
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para" id="user_lost_password_content">
+                                       <h:form id="lost_password_form">
+                                               <div class="table">
+                                                       <div class="table_header">
+                                                               #{msg.GUEST_LOST_PASSWORD_TITLE}
+                                                       </div>
 
-                                               <fieldset id="login_data">
-                                                       <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}">#{msg.GUEST_LOST_PASSWORD_LEGEND}</legend>
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}">#{msg.GUEST_LOST_PASSWORD_LEGEND}</legend>
 
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="id" value="#{msg.ENTER_USER_NAME}" />
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="id" value="#{msg.ENTER_USER_NAME}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText styleClass="input" id="id" size="10" maxlength="20" value="#{passwordRecoveryController.userId}" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="table_right">
-                                                                       <h:inputText styleClass="input" id="id" size="10" maxlength="20" value="#{passwordRecoveryController.userId}" />
+                                                               <div class="table_header">
+                                                                       #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL}
                                                                </div>
 
-                                                               <div class="clear"></div>
-                                                       </div>
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="email" value="#{msg.ENTER_EMAIL_ADDRESS}" />
+                                                                       </div>
 
-                                                       <div class="table_header">
-                                                               #{msg.GUEST_LOST_PASSWORD_NUMBER_OR_EMAIL}
-                                                       </div>
+                                                                       <div class="table_right">
+                                                                               <h:inputText styleClass="input" id="email" size="20" maxlength="255" value="#{passwordRecoveryController.emailAddress}" />
+                                                                       </div>
 
-                                                       <div class="table_row">
-                                                               <div class="table_left">
-                                                                       <h:outputLabel for="email" value="#{msg.ENTER_EMAIL_ADDRESS}" />
+                                                                       <div class="clear"></div>
                                                                </div>
 
-                                                               <div class="table_right">
-                                                                       <h:inputText styleClass="input" id="email" size="20" maxlength="255" value="#{passwordRecoveryController.emailAddress}" />
-                                                               </div>
+                                                       </fieldset>
 
-                                                               <div class="clear"></div>
+                                                       <div class="table_footer">
+                                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                               <h:commandButton styleClass="submit" type="submit" value="#{msg.BUTTON_CONTINUE_STEP_2}" action="#{passwordRecoveryController.doLostPasswordStep2()}" />
                                                        </div>
-
-                                               </fieldset>
-
-                                               <div class="table_footer">
-                                                       <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" value="#{msg.BUTTON_CONTINUE_STEP_2}" action="#{passwordRecoveryController.doLostPasswordStep2()}" />
                                                </div>
-                                       </div>
-                               </h:form>
-                       </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index ab0f910484e5148e4601aefb37a4dc9b663d52d9..e8546fec4bb687815a20b90c71e61b250770fba6 100644 (file)
@@ -3,10 +3,10 @@
 <html
        lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
        xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-         xmlns:h="http://xmlns.jcp.org/jsf/html"
-         xmlns:f="http://xmlns.jcp.org/jsf/core"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
        <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER}</ui:define>
                </ui:define>
 
                <ui:define name="content">
-                       <div class="para">
-                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
-                               <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
-                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
-                       </div>
+                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <div class="para">
+                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
+                                       <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
+                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                               </div>
+                       </ui:fragment>
 
                        <div class="registration_form">
-                               <ui:include src="/WEB-INF/templates/guest/user/guest_registration_form.tpl" />
+                               <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" />
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl" />
+                               </ui:fragment>
                        </div>
                </ui:define>
        </ui:composition>
diff --git a/web/guest/user/register_page2.xhtml b/web/guest/user/register_page2.xhtml
new file mode 100644 (file)
index 0000000..04b7ccd
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER_PAGE2}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_USER_REGISTER_PAGE2}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
+                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <div class="para">
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
+                                               <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                                       </div>
+                               </ui:fragment>
+
+                               <div class="registration_form">
+                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl" />
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
index 89da7508a44c89c9272cbf237cc5ffa2ed79570c..4c619697e619cc149701338460e07b7b201c2237 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not registerController.isResendConfirmationLinkEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 59d00852becbb50ee6cd3c6c37db95d2a21d28de..cf4e580c5eccb03c4666822045dca3d5620a2d5b 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isUserIdEmpty()}">
-                               <ui:include src="/WEB-INF/templates/user/userid_error.tpl" />
-                       </ui:fragment>
+                       <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
+                               <ui:fragment rendered="#{userController.isUserIdEmpty()}">
+                                       <ui:include src="/WEB-INF/templates/user/userid_error.tpl" />
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}">
+                                       #{msg.ERROR_PROFILE_NOT_VISIBLE}
+                               </ui:fragment>
 
-                       <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}">
-                               #{msg.ERROR_PROFILE_NOT_VISIBLE}
+                               <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
+                                       <div align="center">
+                                               <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
+                                                       <f:facet name="header">
+                                                               #{msg.PUBLIC_USER_PROFILE}
+                                                       </f:facet>
+                                               </h:panelGrid>
+                                       </div>
+                               </ui:fragment>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
-                               <div align="center">
-                                       <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
-                                               <f:facet name="header">
-                                                       #{msg.PUBLIC_USER_PROFILE}
-                                               </f:facet>
-                                       </h:panelGrid>
-                               </div>
+                       <ui:fragment rendered="#{not userController.isPublicUserProfileEnabled()}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>