- no more tons of separate and same-looking methods, just one central and very flexible method isFeatureEnabled()
- renamed all context parameters
- added features "imprint", "terms" and "privacy"
Signed-off-by: Roland Häder <roland@mxchange.org>
this.contactId = contactId;
}
+ @Override
+ public String getControllerType () {
+ return "admin"; //NOI18N
+ }
+
+ @Override
+ @Deprecated
+ public void setControllerType (final String controllerType) {
+ throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
+ }
+
@Override
public Country getCountry () {
return this.country;
@Override
public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) {
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedContact(): event={0} - CALLED!", event)); //NOI18N
+
// The event must be valid
if (null == event) {
// Throw NPE
@Override
public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) {
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedUserEvent(): event={0} - CALLED!", event)); //NOI18N
+
// event should not be null
if (null == event) {
// Throw NPE
// Add email address to list
this.emailAddressList.add(event.getUpdatedContact().getContactEmailAddress());
+
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminUpdatedContactDataEvent(): EXIT!"); //NOI18N
}
@Override
// Add contact to list
this.contactList.add(contact);
+
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println("ContactWebBean:afterAdminUpdatedContactDataEvent: EXIT!"); //NOI18N
}
@Override
this.comment = comment;
}
+ @Override
+ public String getControllerType () {
+ return "general"; //NOI18N
+ }
+
+ @Override
+ @Deprecated
+ public void setControllerType (final String controllerType) {
+ throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
+ }
+
@Override
public Country getCountry () {
return this.country;
*/
void setZipCode (final Integer zipCode);
+ /**
+ * Getter for controller type
+ * <p>
+ * @return controller type
+ */
+ String getControllerType ();
+
+ /**
+ * Setter for controller type
+ * <p>
+ * @param controllerType Controller type
+ * @deprecated Don't use this method.
+ */
+ @Deprecated
+ void setControllerType (final String controllerType);
+
/**
* Checks whether contact instance's email address is used
* <p>
*/
String doChangePersonalContactData ();
+ /**
+ * Returns a list of all selectable contacts for user creation. Contacts
+ * from already existing users are excluded in this list.
+ * <p>
+ * @return A list of all selectable contacts
+ */
+ List<Contact> selectableContacts ();
+
}
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.mxchange.addressbook.beans.BaseAddressbookController;
+import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController;
import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcoreee.utils.FacesUtils;
*/
private final EmailChangeSessionBeanRemote emailBean;
+ /**
+ * Features controller
+ */
+ @Inject
+ private AddressbookFeaturesWebApplicationController featureController;
+
/**
* Login bean (controller)
*/
// Password not matching
this.showFacesMessage("login_change_email_address_form:currentPassword", new UserPasswordMismatchException(this.loginController.getLoggedInUser())); //NOI18N
return ""; //NOI18N
+ } else if (!this.featureController.isFeatureEnabled("edit_user_data")) { //NOI18N
+ // Editing is not allowed
+ throw new IllegalStateException("User tried to edit personal data"); //NOI18N
}
// Get user instance
--- /dev/null
+/*
+ * 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.addressbook.beans.features;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.faces.context.FacesContext;
+import javax.inject.Named;
+import org.mxchange.pizzaapplication.beans.BasePizzaController;
+
+/**
+ * A feature bean
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@Named ("featureController")
+@ApplicationScoped
+public class AddressbookFeatureWebApplicationBean extends BasePizzaController implements AddressbookFeaturesWebApplicationController {
+
+ /**
+ * Serial number
+ */
+ private static final long serialVersionUID = 64_237_512_690_168_674L;
+
+ @Override
+ public boolean isFeatureEnabled (final String feature) {
+ // The parameter must be set
+ if (null == feature) {
+ // Throw NPE
+ throw new NullPointerException("feature is null"); //NOI18N
+ } else if (feature.isEmpty()) {
+ // Is empty
+ throw new IllegalArgumentException("feature is empty"); //NOI18N
+ }
+
+ // Get context parameter
+ String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
+
+ // Is it set?
+ boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
+
+ // Return value
+ return isEnabled;
+ }
+
+}
--- /dev/null
+/*
+ * 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.addressbook.beans.features;
+
+import java.io.Serializable;
+import javax.ejb.Local;
+
+/**
+ * An interface for country beans
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@Local
+public interface AddressbookFeaturesWebApplicationController extends Serializable {
+
+ /**
+ * Checks if given feature is enabled.
+ * <p>
+ * @param feature Feature to be checked
+ * <p>
+ * @return Whether given feature is enabled
+ */
+ boolean isFeatureEnabled (final String feature);
+
+}
return UserUtils.ifPasswordMatches(container, this.getLoggedInUser());
}
- @Override
- public boolean isGuest () {
- return (!this.isUserLoggedIn());
- }
-
@Override
public boolean isInvisible () {
// Check on login
*/
boolean isUserLoggedIn ();
- /**
- * Is this truly a guest?
- * <p>
- * @return Whether the user is truly a guest
- */
- boolean isGuest ();
-
/**
* Whether the currently logged-in user is invisible
* <p>
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.NamingException;
import org.mxchange.addressbook.beans.BaseAddressbookController;
import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
+import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController;
import org.mxchange.addressbook.beans.user.AddressbookAdminUserWebRequestController;
import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
import org.mxchange.jcontacts.contact.Contact;
@Inject
private AddressbookContactWebSessionController contactController;
+ /**
+ * Features controller
+ */
+ @Inject
+ private AddressbookFeaturesWebApplicationController featureController;
+
/**
* Reemote register session bean
*/
@Override
public String doFinishRegistration () {
+ // Is registration enabled?
+ if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
+ // Is not enabled
+ throw new FaceletException("Registration is disabled."); //NOI18N
+ }
+
// Get user instance
User user = this.userController.createUserInstance(true);
} else if (!this.userController.isRequiredPersonalDataSet()) {
// Not all required fields are set
throw new FaceletException("Not all required fields are set."); //NOI18N
- } else if ((this.userController.isUserNameRequired()) && (this.userController.isUserNameRegistered(user))) {
+ } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
// User name is already used
throw new FaceletException(new UserNameAlreadyRegisteredException(user));
} else if (this.contactController.isEmailAddressRegistered(user.getUserContact())) {
@Override
public String doRegisterMultiPage1 () {
+ // Is registration enabled?
+ if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
+ // Is not enabled
+ throw new FaceletException("Registration is disabled."); //NOI18N
+ }
+
// Get user instance
User user = this.userController.createUserInstance(false);
if (null == user) {
// user must be set
throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N
- } else if ((this.userController.isUserNameRequired()) && (this.userController.isUserNameRegistered(user))) {
+ } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
// User name is already used
throw new FaceletException(new UserNameAlreadyRegisteredException(user));
} else if (!this.contactController.isSameEmailAddressEntered()) {
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;
- }
-
}
*/
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 ();
-
}
import javax.naming.NamingException;
import org.mxchange.addressbook.beans.BaseAddressbookController;
import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
+import org.mxchange.addressbook.beans.features.AddressbookFeaturesWebApplicationController;
import org.mxchange.addressbook.beans.localization.AddressbookLocalizationSessionController;
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.jusercore.events.confirmation.UserConfirmedAccountEvent;
private AddressbookContactWebSessionController contactController;
/**
- * Localization controller
- */
- @Inject
- private AddressbookLocalizationSessionController localizationController;
-
- /**
- * Login bean (controller)
+ * Features controller
*/
@Inject
- private AddressbookUserLoginWebSessionController loginController;
+ private AddressbookFeaturesWebApplicationController featureController;
/**
- * Registration controller
+ * Localization controller
*/
@Inject
- private AddressbookUserRegisterWebSessionController registerController;
-
- /**
- * A list of all selectable contacts
- */
- private List<Contact> selectableContacts;
+ private AddressbookLocalizationSessionController localizationController;
/**
* Event being fired when user updated personal data
user.setUserProfileMode(this.getUserProfileMode());
// Is multiple registration page
- if (!this.registerController.isMultiplePageEnabled()) {
+ if ((createContactData) || (!this.featureController.isFeatureEnabled("user_register_multiple_page"))) { //NOI18N
// Create contact instance
Contact contact = this.contactController.createContactInstance();
throw new FaceletException("Not all required fields are set."); //NOI18N
} else if (!this.userLoginController.ifCurrentPasswordMatches()) {
// Password not matching
- throw new FaceletException(new UserPasswordMismatchException(this.loginController.getLoggedInUser()));
+ throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
+ } else if (!this.featureController.isFeatureEnabled("edit_user_data")) {
+ // Editing is not allowed
+ throw new IllegalStateException("User tried to edit personal data"); //NOI18N
}
// Get user instance
@Override
public boolean isRequiredPersonalDataSet () {
- if (this.registerController.isMultiplePageEnabled()) {
+ if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
// Multiple registration page
return this.contactController.isRequiredPersonalDataSet();
} else {
}
@Override
- public User lookupUserById (final Long userId) throws UserNotFoundException {
+ public User lookupUserByEmailAddress (final String emailAddress) throws UserEmailAddressNotFoundException {
// Parameter must be valid
- if (null == userId) {
+ if (null == emailAddress) {
// Throw NPE
- throw new NullPointerException("userId is null"); //NOI18N
- } else if (userId < 1) {
+ throw new NullPointerException("emailAddress is null"); //NOI18N
+ } else if (emailAddress.isEmpty()) {
// Not valid
- throw new IllegalArgumentException(MessageFormat.format("userId={0} is not valid.", userId)); //NOI18N
+ throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
}
// Init variable
// Get next user
User next = iterator.next();
- // Is the user id found?
- if (Objects.equals(next.getUserId(), userId)) {
+ // Contact should be set
+ if (next.getUserContact() == null) {
+ // Contact is null
+ throw new NullPointerException(MessageFormat.format("next.userContact is null for user id {0}", next.getUserId())); //NOI18N
+ } else if (next.getUserContact().getContactEmailAddress() == null) {
+ // Email address should be set
+ throw new NullPointerException(MessageFormat.format("next.userContact.contactEmailAddress is null for user id {0}", next.getUserId())); //NOI18N //NOI18N
+ }
+
+ // Is the email address found?
+ if (Objects.equals(next.getUserContact().getContactEmailAddress(), emailAddress)) {
// Copy to other variable
user = next;
break;
// Is it still null?
if (null == user) {
// Not visible for the current user
- throw new UserNotFoundException(userId);
+ throw new UserEmailAddressNotFoundException(emailAddress);
}
// Return it
}
@Override
- public User lookupUserByEmailAddress (final String emailAddress) throws UserEmailAddressNotFoundException {
+ public User lookupUserById (final Long userId) throws UserNotFoundException {
// Parameter must be valid
- if (null == emailAddress) {
+ if (null == userId) {
// Throw NPE
- throw new NullPointerException("emailAddress is null"); //NOI18N
- } else if (emailAddress.isEmpty()) {
+ throw new NullPointerException("userId is null"); //NOI18N
+ } else if (userId < 1) {
// Not valid
- throw new IllegalArgumentException("emailAddress is empty"); //NOI18N
+ throw new IllegalArgumentException(MessageFormat.format("userId={0} is not valid.", userId)); //NOI18N
}
// Init variable
// Get next user
User next = iterator.next();
- // Contact should be set
- if (next.getUserContact() == null) {
- // Contact is null
- throw new NullPointerException(MessageFormat.format("next.userContact is null for user id {0}", next.getUserId())); //NOI18N
- } else if (next.getUserContact().getContactEmailAddress() == null) {
- // Email address should be set
- throw new NullPointerException(MessageFormat.format("next.userContact.contactEmailAddress is null for user id {0}", next.getUserId())); //NOI18N //NOI18N
- }
-
- // Is the email address found?
- if (Objects.equals(next.getUserContact().getContactEmailAddress(), emailAddress)) {
+ // Is the user id found?
+ if (Objects.equals(next.getUserId(), userId)) {
// Copy to other variable
user = next;
break;
// Is it still null?
if (null == user) {
// Not visible for the current user
- throw new UserEmailAddressNotFoundException(emailAddress);
+ throw new UserNotFoundException(userId);
}
// Return it
+++ /dev/null
-/*
- * Copyright (C) 2016 Cho-Time GmbH
- *
- * 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.pizzaapplication.beans.features;
-
-import javax.enterprise.context.ApplicationScoped;
-import javax.faces.context.FacesContext;
-import javax.inject.Named;
-import org.mxchange.pizzaapplication.beans.BasePizzaController;
-
-/**
- * A feature bean
- * <p>
- * @author Roland Haeder<rhaeder@cho-time.de>
- */
-@Named ("featureController")
-@ApplicationScoped
-public class PizzaFeatureWebApplicationBean extends BasePizzaController implements PizzaFeaturesWebApplicationController {
-
- /**
- * Serial number
- */
- private static final long serialVersionUID = 64_237_512_690_168_674L;
-
- @Override
- public boolean isFeatureEnabled (final String feature) {
- // The parameter must be set
- if (null == feature) {
- // Throw NPE
- throw new NullPointerException("feature is null"); //NOI18N
- } else if (feature.isEmpty()) {
- // Is empty
- throw new IllegalArgumentException("feature is empty"); //NOI18N
- }
-
- // Get context parameter
- String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter(String.format("is_feature_%s_enabled", feature)); //NOI18N
-
- // Is it set?
- boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
-
- // Return value
- return isEnabled;
- }
-
-}
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<ui:fragment rendered="#{not empty targetController}">
- <h:selectOneMenu styleClass="select" id="gender" value="#{targetController.gender}" required="true" requiredMessage="#{msg.FIELD_GENDER_REQUIRED}">
+ <h:selectOneMenu styleClass="select" id="gender" value="#{targetController.gender}" required="#{featureController.isFeatureEnabled(targetController.controllerType + '_gender')}" requiredMessage="#{msg.FIELD_GENDER_REQUIRED}">
<f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
<f:selectItems value="#{genderController.selectableGenders}" var="gender" itemValue="#{gender}" itemLabel="#{msg[gender.messageKey]}" />
</h:selectOneMenu>
</ui:define>
<ui:define name="menu">
- <ui:include src="/WEB-INF/templates/guest/guest_menu.tpl" />
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('guest_menu')}">
+ <ui:include src="/WEB-INF/templates/guest/guest_menu.tpl" />
+ </ui:fragment>
</ui:define>
<ui:define name="footer">
<h:link outcome="index" title="#{msg.LINK_GUEST_HOME_TITLE}" value="#{msg.LINK_GUEST_HOME}" />
</li>
- <li class="footer_link">
- <h:link outcome="user_resend_link" title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" value="#{msg.LINK_GUEST_RESEND_LINK}" />
- </li>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+ <li class="footer_link">
+ <h:link outcome="user_resend_link" title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" value="#{msg.LINK_GUEST_RESEND_LINK}" />
+ </li>
+ </ui:fragment>
- <li class="footer_link">
- <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
- </li>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('imprint')}">
+ <li class="footer_link">
+ <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
+ </li>
+ </ui:fragment>
- <li class="footer_link">
- <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
- </li>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('terms')}">
+ <li class="footer_link">
+ <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
+ </li>
+ </ui:fragment>
- <li class="footer_link">
- <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
- </li>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('privacy')}">
+ <li class="footer_link">
+ <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
+ </li>
+ </ui:fragment>
<li class="footer_copyright">Copyright (c) 2016 by Roland Häder</li>
</ul>
</div>
<ul>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<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>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+ <li>
+ <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
+ </li>
+ </ui:fragment>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
<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()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
<li>
<h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
</li>
<h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
</legend>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<div class="table_row">
<div class="table_left">
<h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
<ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<div class="para"></div>
<div class="table_row">
<h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
</legend>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<div class="table_row">
<div class="table_left">
<h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
<ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<div class="para"></div>
<div class="table_row">
<li>
<h:link title="#{msg.LINK_USER_LIST_TITLE}" outcome="user_list" value="#{msg.LINK_USER_LIST}" />
</li>
+
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_list')}">
+ <li>
+ <h:link title="#{msg.LINK_USER_LIST_TITLE}" outcome="user_list" value="#{msg.LINK_USER_LIST}" />
+ </li>
+ </ui:fragment>
</ul>
- <div class="menu_header">
- <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
- </div>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+ <div class="menu_header">
+ <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
+ </div>
- <ul>
- <li>
- <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="user_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
- </li>
- </ul>
+ <ul>
+ <li>
+ <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="user_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
+ </li>
+ </ul>
+ </ui:fragment>
<div class="menu_header">
<h:outputText value="#{msg.MENU_ADDRESSBOOKS_TITLE}" />
<description>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.</description>
<display-name>Addressbook Application v1.0</display-name>
<context-param>
- <description>Whether debug mode is for registration controller enabled.</description>
- <param-name>is_debug_register_enabled</param-name>
+ <description>Whether the multi-page registration page or a single registration page is active</description>
+ <param-name>is_feature_user_register_multiple_page</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether a user name is required for this application.</description>
+ <param-name>is_feature_user_name_required_enabled</param-name>
+ <param-value>true</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 the multi-page registration page or a single registration page is active</description>
- <param-name>is_multi_register_page</param-name>
+ <description>Whether "resend confirmation link" is enabled.</description>
+ <param-name>is_feature_user_resend_confirm_link_enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether default timezon is set from system's timezone</description>
+ <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</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>
+ <description>Whether registration page is enabled.</description>
+ <param-name>is_feature_user_registration_enabled</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>
+ <description>Whether the guest menu is enabled/shown to the user.</description>
+ <param-name>is_feature_guest_menu_enabled</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether recovery of user passwords is enabled.</description>
+ <param-name>is_feature_user_password_recovery_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>
+ <description>Wether the gender is required for using the general contact controller.</description>
+ <param-name>is_feature_general_gender_enabled</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
- <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
+ <description>Whether gender is required for administrative contact controller.</description>
+ <param-name>is_feature_admin_gender_enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether users are allowed to edit their user data.</description>
+ <param-name>is_feature_user_edit_data_enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether the user list is accessible and visible.</description>
+ <param-name>is_feature_user_list_enabled</param-name>
+ <param-value>false</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether imprint page is enabled.</description>
+ <param-name>is_feature_imprint_enabled</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether terms page is enabled.</description>
+ <param-name>is_feature_terms_enabled</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <description>Whether privacy page is enabled.</description>
+ <param-name>is_feature_privacy_enabled</param-name>
<param-value>true</param-value>
</context-param>
<servlet>
</h:link>
</p:column>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<p:column>
<f:facet name="header">
<h:outputText value="#{msg.ADMIN_EXPORT_USER_NAME_TITLE}" />
<h:outputText id="userId" styleClass="data_field" value="#{beanHelper.user.userId}" />
</h:column>
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<h:column>
<h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
- <div class="para">
- <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" />
- <h:link id="user_register" outcome="user_register" title="#{msg.LINK_GUEST_USER_NO_ACCOUNT_TITLE}" value="#{msg.LINK_GUEST_USER_NO_ACCOUNT_YET}" />
- </div>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+ <div class="para">
+ <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" />
+ <h:outputText value=" " />
+ <h:link id="user_register" outcome="user_register" title="#{msg.LINK_GUEST_USER_NO_ACCOUNT_TITLE}" value="#{msg.LINK_GUEST_USER_NO_ACCOUNT_YET}" />
+ </div>
+ </ui:fragment>
<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 rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
+ <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>
- <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required')}">
<h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" />
</ui:fragment>
</ui:define>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
<div class="para" id="user_lost_password_content">
<h:form id="lost_password_form">
<div class="table">
</div>
</ui:fragment>
- <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required') or not featureController.isFeatureEnabled('user_password_recovery')}">
<h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
</ui:fragment>
</ui:define>
</ui:define>
<ui:define name="content">
- <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}
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+ <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:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}">
+ <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" />
+ </ui:fragment>
+
+ <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}">
+ <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl" />
+ </ui:fragment>
</div>
</ui:fragment>
- <div class="registration_form">
- <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:fragment rendered="#{not featureController.isFeatureEnabled('user_registration')}">
+ <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" />
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
- <ui:fragment rendered="#{userController.isUserNameRequired()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
<div class="para">
#{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
<h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
</div>
</ui:fragment>
- <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+ <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}">
<h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" />
</ui:fragment>
</ui:define>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
<h:form id="form_resend_link">
<div class="table">
<div class="table_header">
</h:form>
</ui:fragment>
- <ui:fragment rendered="#{not registerController.isResendConfirmationLinkEnabled()}">
- <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+ <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+ <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" />
</ui:fragment>
</ui:define>
</ui:composition>
<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/#{userLoginController.baseTemplatePathName}_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_USER_LIST}</ui:define>
</ui:define>
<ui:define name="content">
- <div class="table_big">
- <div class="table_header">
- #{msg.TABLE_HEADER_USER_LIST}
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_list')}">
+ <div class="table_big">
+ <div class="table_header">
+ <h:outputText value="#{msg.TABLE_HEADER_USER_LIST}" />
+ </div>
+
+ <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}">
+ <h:column>
+ <f:facet name="header">#{msg.USER_NAME}</f:facet>
+ <ui:include src="/WEB-INF/templates/user/user_profile_link.tpl">
+ <ui:param name="user" value="#{user}" />
+ </ui:include>
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">#{msg.USER_CREATED}</f:facet>
+ <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">#{msg.USER_CREATED}</f:facet>
+ <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">#{msg.USER_LIST_SHARING_ADDRESSBOOKS}</f:facet>
+ <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+ <h:link outcome="login_list_sharing_addressbooks" value="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS}" title="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS_TITLE}">
+ <f:param name="userId" value="#{user.userId}" />
+ </h:link>
+ </ui:fragment>
+ <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+ <h:outputText id="userShared" value="#{addressbookController.countAllUserSharedAddressbooks(user)}" />
+ </ui:fragment>
+ </h:column>
+ </h:dataTable>
</div>
- <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}">
- <h:column>
- <f:facet name="header">#{msg.USER_NAME}</f:facet>
- <ui:include src="/WEB-INF/templates/user/user_profile_link.tpl">
- <ui:param name="user" value="#{user}" />
- </ui:include>
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.USER_CREATED}</f:facet>
- <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.USER_LIST_SHARING_ADDRESSBOOKS}</f:facet>
- <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
- <h:link outcome="login_list_sharing_addressbooks" value="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS}" title="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS_TITLE}">
- <f:param name="userId" value="#{user.userId}" />
- </h:link>
- </ui:fragment>
- <ui:fragment rendered="#{loginController.isGuest()}">
- <h:outputText id="userShared" value="#{addressbookController.countAllUserSharedAddressbooks(user)}" />
- </ui:fragment>
- </h:column>
- </h:dataTable>
- </div>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_USER_LIST_DISABLED}" rendered="#{featureController.isFeatureEnabled('user_list')}" />
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
</ui:define>
<ui:define name="content">
- TODO: Hier kommt das Impressum hin!
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('imprint')}">
+ TODO: Hier kommt das Impressum hin!
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
</ui:define>
<ui:define name="content">
- Hier kommen die Datenschutzbestimmungen hin.
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('privacy')}">
+ Hier kommen die Datenschutzbestimmungen hin.
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
</ui:define>
<ui:define name="content">
- Hier kommen die allgemeinen Geschäftsbedingungen hin.
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('terms')}">
+ Hier kommen die allgemeinen Geschäftsbedingungen hin.
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
- <div class="table">
- <div class="table_header">
- <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
- </div>
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
+ </div>
- <h:form id="login_change_email_address_form">
- <div class="para">
- <fieldset id="change_email">
- <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
- <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
- </legend>
+ <h:form id="login_change_email_address_form">
+ <div class="para">
+ <fieldset id="change_email">
+ <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
+ <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
+ </legend>
- <div class="table_row">
- <div class="table_left">
- <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" />
- </div>
+ <div class="table_row">
+ <div class="table_left">
+ <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" />
+ </div>
- <div class="table_right">
- <h:outputText value="#{contactController.emailAddress}" />
- </div>
+ <div class="table_right">
+ <h:outputText value="#{contactController.emailAddress}" />
+ </div>
- <div class="clear"></div>
- </div>
+ <div class="clear"></div>
+ </div>
- <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
- </fieldset>
- </div>
+ <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
+ </fieldset>
+ </div>
- <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+ <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+ </h:form>
+ </div>
- <div class="table_footer">
- <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" />
- </div>
- </h:form>
- </div>
- </ui:fragment>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+ </ui:fragment>
- <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
- <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
- </ui:fragment>
+ <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+ <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+ </ui:fragment>
</ui:define>
</ui:composition>
</html>
<ui:define name="content">
<ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
- <div class="table">
- <div class="table_header">
- <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
- </div>
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
+ </div>
+
+ <h:form id="login_form">
+ <div class="para">
+ <fieldset id="change_password">
+ <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">
+ <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
+ </legend>
+
+ <div class="table_row">
+ <div class="table_left">
+ <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+ </div>
<h:form id="login_form">
<div class="para">
<ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
- <div class="table_footer">
- <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userController.changePassword()}" />
- </div>
- </h:form>
- </div>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
</ui:fragment>
<ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
<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/login/user/user_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_PERSONAL_DATA}</ui:define>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
- <div class="table">
- <div class="table_header">
- #{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}
- </div>
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+ <div class="table">
+ <div class="table_header">
+ <h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
+ </div>
- <h:form id="login_change_personal_form">
- <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+ <h:form id="login_change_personal_form">
+ <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
- <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
+ <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
- <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+ <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="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
- </div>
- </h:form>
- </div>
+ <div class="table_footer">
+ <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton styleClass="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
+ </div>
+ </h:form>
+ </div>
+ </ui:fragment>
+
+ <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
</ui:fragment>
<ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
<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/login/user/user_base.tpl">
<ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CONTACT_DATA_SAVED}</ui:define>
</ui:define>
<ui:define name="content">
- <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
- <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
- <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
- </ui:include>
+ <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+ <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+ <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
+ </ui:include>
+ </ui:fragment>
</ui:fragment>
+ <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+
<ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
<ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
</ui:fragment>