]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 19 May 2016 11:42:54 +0000 (13:42 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 26 May 2016 15:05:06 +0000 (17:05 +0200)
- renamed adminHelper to beanHelp as this is a really generic bean helper
- renames same class/interface, too
- added JSF page for confirming accounts with optional parameter confirmKey. If this is not set, a message will be shown
- added i18n keys for above new page
- added controller bean for above page to handle the confirmation + calling proper EJB business method

Signed-off-by: Roland Häder <roland@mxchange.org>
26 files changed:
src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/contact/JobsAdminContactWebRequestBean.java
src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java [deleted file]
src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java [deleted file]
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelper.java [new file with mode: 0644]
src/java/org/mxchange/jjobs/beans/user/JobsAdminUserWebRequestBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/admin/contact/admin_contact_data.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl [new file with mode: 0644]
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
web/admin/contact/admin_contact_delete.xhtml
web/admin/contact/admin_contact_edit.xhtml
web/admin/contact/admin_contact_list.xhtml
web/admin/contact/admin_contact_show.xhtml
web/admin/country/admin_country_list.xhtml
web/admin/mobile_provider/admin_mobile_provider_list.xhtml
web/admin/user/admin_user_delete.xhtml
web/admin/user/admin_user_edit.xhtml
web/admin/user/admin_user_list.xhtml
web/admin/user/admin_user_show.xhtml
web/admin/user/admin_user_unlock.xhtml
web/guest/user/confirm_account.xhtml [new file with mode: 0644]
web/guest/user/resend_link.xhtml

diff --git a/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestBean.java
new file mode 100644 (file)
index 0000000..0f07518
--- /dev/null
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.confirmlink;
+
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.jcoreee.utils.FacesUtils;
+import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
+import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
+import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
+import org.mxchange.jusercore.exceptions.UserStatusLockedException;
+import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
+import org.mxchange.jusercore.model.user.status.UserAccountStatus;
+
+/**
+ * A web request bean for confirmation link handling
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("confirmationLinkController")
+@RequestScoped
+public class JobsConfirmationLinkWebRequestBean extends BaseJobsController implements JobsConfirmationLinkWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 57_637_182_796_370L;
+
+       /**
+        * Admin helper instance
+        */
+       @Inject
+       private JobsWebRequestController beanHelper;
+
+       /**
+        * Confirmation key
+        */
+       private String confirmationKey;
+
+       /**
+        * Remote user bean
+        */
+       private final UserSessionBeanRemote userBean;
+
+       /**
+        * User controller
+        */
+       @Inject
+       private JobsUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public JobsConfirmationLinkWebRequestBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+       @Override
+       public String getConfirmationKey () {
+               return this.confirmationKey;
+       }
+
+       @Override
+       public void setConfirmationKey (final String confirmationKey) {
+               this.confirmationKey = confirmationKey;
+       }
+
+       @Override
+       public void maybeConfirmUserAccount () {
+               // Is the confirmation key set?
+               if (this.getConfirmationKey() == null) {
+                       // May be null if not set
+                       return;
+               } else if (this.getConfirmationKey().isEmpty()) {
+                       // Is empty string
+                       return;
+               }
+
+               // Now try to find the user in user list, first get the whole list
+               List<User> users = this.userController.allUsers();
+
+               // Get iterator from it
+               Iterator<User> iterator = users.iterator();
+
+               // Init instance
+               User user = null;
+
+               // Then loop through all
+               while (iterator.hasNext()) {
+                       // Get next user
+                       User next = iterator.next();
+
+                       // Same confirmation key?
+                       if (Objects.equals(this.getConfirmationKey(), next.getUserConfirmKey())) {
+                               // Found it, then set it and abort loop
+                               user = next;
+                               break;
+                       }
+               }
+
+               // Is the user instance null?
+               if ((null == user) || (user.getUserAccountStatus() != UserAccountStatus.UNCONFIRMED)) {
+                       // Then clear this bean and the helper
+                       this.beanHelper.setUser(null);
+               } else {
+                       // Set user ...
+                       this.beanHelper.setUser(user);
+
+                       // ... and copy it to the controller
+                       this.beanHelper.copyUserToController();
+
+                       // Try to confirm it
+                       this.confirmUserAccount();
+               }
+       }
+
+       /**
+        * Tries to confirm the currently set user instance (in helper).
+        */
+       private void confirmUserAccount () {
+               // Get user instance
+               User user = this.beanHelper.getUser();
+
+               // Should be set
+               if (null == user) {
+                       // Throw NPE
+                       throw new NullPointerException("user is null");
+               } else if (user.getUserId() == null) {
+                       // Abort here
+                       throw new NullPointerException("user.userId is null"); //NOI18N
+               } else if (user.getUserId() < 1) {
+                       // Invalid number
+                       throw new IllegalArgumentException(MessageFormat.format("userId is not valid: {0}", user.getUserId())); //NOI18N
+               } else if (user.getUserAccountStatus() == UserAccountStatus.CONFIRMED) {
+                       // Account is already confirmed
+                       throw new FaceletException(new UserStatusConfirmedException(user));
+               } else if (user.getUserAccountStatus() == UserAccountStatus.LOCKED) {
+                       // Account is already confirmed
+                       throw new FaceletException(new UserStatusLockedException(user));
+               } else if (user.getUserConfirmKey() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("user.userConfirmKey is null"); //NOI18N
+               }
+
+               // Updated user instance
+               User updatedUser;
+
+               try {
+                       // Get base URL
+                       String baseUrl = FacesUtils.generateBaseUrl();
+
+                       // Confirm account
+                       updatedUser = this.userBean.confirmAccount(user, baseUrl);
+               } catch (final UserStatusConfirmedException | UserStatusLockedException ex) {
+                       // Something unexpected happened
+                       throw new FaceletException(MessageFormat.format("Cannot confirm user account {0}", user.getUserName()), ex); //NOI18N
+               }
+
+               // Set it again in helper
+               this.beanHelper.setUser(updatedUser);
+       }
+
+}
diff --git a/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestController.java b/src/java/org/mxchange/jjobs/beans/confirmlink/JobsConfirmationLinkWebRequestController.java
new file mode 100644 (file)
index 0000000..183a472
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2016 Roland Haeder
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jjobs.beans.confirmlink;
+
+import java.io.Serializable;
+
+/**
+ * An interface for an email change controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface JobsConfirmationLinkWebRequestController extends Serializable {
+
+       /**
+        * Getter for confirmation key
+        * <p>
+        * @return Confirmation key
+        */
+       String getConfirmationKey ();
+
+       /**
+        * Setter for confirmation key
+        * <p>
+        * @param confirmationKey Confirmation key
+        */
+       void setConfirmationKey (final String confirmationKey);
+
+       /**
+        * Tries to lookup the user by currently set confirmation key and if found
+        * tries to confirm it. If no user is found, the instance beanHelper.user is
+        * set to null. Other methods or JSF pages should then respond on this
+        * accordingly.
+        */
+       void maybeConfirmUserAccount ();
+
+}
index 26c6baa526cd1a655bfa856b14f8f57d06f8b5fa..2dcca6da55cd17695790a0448d7902621f1c35ff 100644 (file)
@@ -41,7 +41,6 @@ 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;
 import org.mxchange.jphone.phonenumbers.fax.DialableFaxNumber;
@@ -49,6 +48,7 @@ import org.mxchange.jphone.phonenumbers.fax.FaxNumber;
 import org.mxchange.jphone.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jphone.phonenumbers.mobileprovider.MobileProvider;
+import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
 
 /**
  * An administrative user bean (controller)
@@ -75,7 +75,7 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
         * Admin helper instance
         */
        @Inject
-       private JobsAdminWebRequestController adminHelper;
+       private JobsWebRequestController beanHelper;
 
        /**
         * Birth day
@@ -352,13 +352,13 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
                // Check if contact instance is in helper and valid
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.contact is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.contact is null"); //NOI18N
                } else if (contact.getContactId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
                } else if (contact.getContactId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
                }
 
                // Update all data in contact
@@ -380,18 +380,18 @@ public class JobsAdminContactWebRequestBean extends BaseJobsController implement
        @Override
        public String editContactData () {
                // Get contact instance
-               Contact contact = this.adminHelper.getContact();
+               Contact contact = this.beanHelper.getContact();
 
                // Check if contact instance is in helper and valid
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.contact is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.contact is null"); //NOI18N
                } else if (contact.getContactId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
                } else if (contact.getContactId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
                }
 
                // Update all data in contact
diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestController.java
deleted file mode 100644 (file)
index 0249d9b..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * 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.helper;
-
-import java.io.Serializable;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * An interface for general bean helper
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-public interface JobsAdminWebRequestController extends Serializable {
-
-       /**
-        * Getter for user instance
-        * <p>
-        * @return User instance
-        */
-       User getUser ();
-
-       /**
-        * Setter for user instance
-        * <p>
-        * @param user User instance
-        */
-       void setUser (final User user);
-
-       /**
-        * Copies currently set user instance's data to adminUserController
-        */
-       void copyUserToController ();
-
-       /**
-        * Returns a message key depending on if this contact is a user and/or a
-        * contact. If this contact is unused, a default key is returned.
-        * <p>
-        * @param contact Contact instance to check
-        * <p>
-        * @return Message key
-        */
-       String getContactUsageMessageKey (final Contact contact);
-
-       /**
-        * Getter for contact instance
-        * <p>
-        * @return Contact instance
-        */
-       Contact getContact ();
-
-       /**
-        * Setter for contact instance
-        * <p>
-        * @param contact Contact instance
-        */
-       void setContact (final Contact contact);
-
-       /**
-        * Copies currently set contact instance's data to adminContactController
-        */
-       void copyContactToController ();
-
-}
diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java b/src/java/org/mxchange/jjobs/beans/helper/JobsAdminWebRequestHelper.java
deleted file mode 100644 (file)
index e3ae2c7..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * 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.helper;
-
-import java.text.MessageFormat;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
-import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A general helper for beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminHelper")
-@RequestScoped
-public class JobsAdminWebRequestHelper implements JobsAdminWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 17_258_793_567_145_701L;
-
-       /**
-        * Regular contact controller
-        */
-       @Inject
-       private JobsAdminContactWebRequestController adminContactController;
-
-       /**
-        * Contact instance
-        */
-       private Contact contact;
-
-       /**
-        * User instance
-        */
-       private User user;
-
-       /**
-        * Regular user controller
-        */
-       @Inject
-       private JobsUserWebSessionController userController;
-
-       /**
-        * Default constructor
-        */
-       public JobsAdminWebRequestHelper () {
-       }
-
-       @Override
-       public void copyContactToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N
-
-               // Validate user instance
-               if (this.getContact() == null) {
-                       // Throw NPE
-                       throw new NullPointerException("this.contact is null"); //NOI18N
-               } else if (this.getContact().getContactId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.contact.contactId is null"); //NOI18N
-               } else if (this.getContact().getContactId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.contact.contactId={0} is not valid.", this.getContact().getContactId())); //NOI18N
-               }
-
-               // Set all fields: user
-               this.adminContactController.copyContactToController(this.getContact());
-
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - EXIT!"); //NOI18N
-       }
-
-       @Override
-       public void copyUserToController () {
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - CALLED!"); //NOI18N
-
-               // Validate user instance
-               if (this.getUser() == null) {
-                       // Throw NPE
-                       throw new NullPointerException("this.user is null");
-               } else if (this.getUser().getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.user.userId is null");
-               } else if (this.getUser().getUserId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId()));
-               }
-
-               // Set all fields: user
-               this.userController.setUserName(this.getUser().getUserName());
-
-               // Log message
-               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N
-       }
-
-       @Override
-       public Contact getContact () {
-               return this.contact;
-       }
-
-       @Override
-       public void setContact (final Contact contact) {
-               this.contact = contact;
-       }
-
-       @Override
-       public String getContactUsageMessageKey (final Contact contact) {
-               // The contact must be valid
-               if (null == contact) {
-                       // Throw NPE
-                       throw new NullPointerException("contact is null"); //NOI18N
-               } else if (contact.getContactId() == null) {
-                       // Throw again ...
-                       throw new NullPointerException("contact.contactId is null"); //NOI18N
-               } else if (contact.getContactId() < 1) {
-                       // Not valid
-                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid", contact.getContactId())); //NOI18N
-               }
-
-               // Default key is "unused"
-               String messageKey = "CONTACT_IS_UNUSED"; //NOI18N
-
-               // Check user
-               boolean isUserContact = this.userController.isContactFound(contact);
-
-               // Check user first
-               if (isUserContact) {
-                       // Only user
-                       messageKey = "CONTACT_IS_USER"; //NOI18N
-               }
-
-               // Return message key
-               return messageKey;
-       }
-
-       @Override
-       public User getUser () {
-               return this.user;
-       }
-
-       @Override
-       public void setUser (final User user) {
-               this.user = user;
-       }
-
-}
diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestController.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestController.java
new file mode 100644 (file)
index 0000000..5fbc8d4
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * 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.helper;
+
+import java.io.Serializable;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * An interface for general bean helper
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface JobsWebRequestController extends Serializable {
+
+       /**
+        * Getter for user instance
+        * <p>
+        * @return User instance
+        */
+       User getUser ();
+
+       /**
+        * Setter for user instance
+        * <p>
+        * @param user User instance
+        */
+       void setUser (final User user);
+
+       /**
+        * Copies currently set user instance's data to adminUserController
+        */
+       void copyUserToController ();
+
+       /**
+        * Returns a message key depending on if this contact is a user and/or a
+        * contact. If this contact is unused, a default key is returned.
+        * <p>
+        * @param contact Contact instance to check
+        * <p>
+        * @return Message key
+        */
+       String getContactUsageMessageKey (final Contact contact);
+
+       /**
+        * Getter for contact instance
+        * <p>
+        * @return Contact instance
+        */
+       Contact getContact ();
+
+       /**
+        * Setter for contact instance
+        * <p>
+        * @param contact Contact instance
+        */
+       void setContact (final Contact contact);
+
+       /**
+        * Copies currently set contact instance's data to adminContactController
+        */
+       void copyContactToController ();
+
+}
diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelper.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelper.java
new file mode 100644 (file)
index 0000000..99d676d
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * 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.helper;
+
+import java.text.MessageFormat;
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController;
+import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A general helper for beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminHelper")
+@RequestScoped
+public class JobsWebRequestHelper implements JobsWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 17_258_793_567_145_701L;
+
+       /**
+        * Regular contact controller
+        */
+       @Inject
+       private JobsAdminContactWebRequestController adminContactController;
+
+       /**
+        * Contact instance
+        */
+       private Contact contact;
+
+       /**
+        * User instance
+        */
+       private User user;
+
+       /**
+        * Regular user controller
+        */
+       @Inject
+       private JobsUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public JobsWebRequestHelper () {
+       }
+
+       @Override
+       public void copyContactToController () {
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - CALLED!"); //NOI18N
+
+               // Validate user instance
+               if (this.getContact() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.contact is null"); //NOI18N
+               } else if (this.getContact().getContactId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.contact.contactId is null"); //NOI18N
+               } else if (this.getContact().getContactId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.contact.contactId={0} is not valid.", this.getContact().getContactId())); //NOI18N
+               }
+
+               // Set all fields: user
+               this.adminContactController.copyContactToController(this.getContact());
+
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyContactToController - EXIT!"); //NOI18N
+       }
+
+       @Override
+       public void copyUserToController () {
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - CALLED!"); //NOI18N
+
+               // Validate user instance
+               if (this.getUser() == null) {
+                       // Throw NPE
+                       throw new NullPointerException("this.user is null");
+               } else if (this.getUser().getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.user.userId is null");
+               } else if (this.getUser().getUserId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId()));
+               }
+
+               // Set all fields: user
+               this.userController.setUserName(this.getUser().getUserName());
+
+               // Log message
+               //* NOISY-DEBUG: */ System.out.println("AdminHelper::copyUserToController - EXIT!"); //NOI18N
+       }
+
+       @Override
+       public Contact getContact () {
+               return this.contact;
+       }
+
+       @Override
+       public void setContact (final Contact contact) {
+               this.contact = contact;
+       }
+
+       @Override
+       public String getContactUsageMessageKey (final Contact contact) {
+               // The contact must be valid
+               if (null == contact) {
+                       // Throw NPE
+                       throw new NullPointerException("contact is null"); //NOI18N
+               } else if (contact.getContactId() == null) {
+                       // Throw again ...
+                       throw new NullPointerException("contact.contactId is null"); //NOI18N
+               } else if (contact.getContactId() < 1) {
+                       // Not valid
+                       throw new IllegalArgumentException(MessageFormat.format("contact.contactId={0} is not valid", contact.getContactId())); //NOI18N
+               }
+
+               // Default key is "unused"
+               String messageKey = "CONTACT_IS_UNUSED"; //NOI18N
+
+               // Check user
+               boolean isUserContact = this.userController.isContactFound(contact);
+
+               // Check user first
+               if (isUserContact) {
+                       // Only user
+                       messageKey = "CONTACT_IS_USER"; //NOI18N
+               }
+
+               // Return message key
+               return messageKey;
+       }
+
+       @Override
+       public User getUser () {
+               return this.user;
+       }
+
+       @Override
+       public void setUser (final User user) {
+               this.user = user;
+       }
+
+}
index b4259c1f5f0e0452db8699af3c2e237345afff54..ae6f6ca42a42b7383eac4a3add6f0b33e5e9f141 100644 (file)
@@ -32,7 +32,6 @@ 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;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
@@ -49,6 +48,7 @@ import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
 import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
+import org.mxchange.jjobs.beans.helper.JobsWebRequestController;
 
 /**
  * A user bean (controller)
@@ -72,10 +72,10 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
        private Event<AdminAddedUserEvent> addedUserEvent;
 
        /**
-        * Admin helper instance
+        * Bean helper instance
         */
        @Inject
-       private JobsAdminWebRequestController adminHelper;
+       private JobsWebRequestController beanHelper;
 
        /**
         * Regular contact controller
@@ -101,12 +101,6 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
        @Inject
        private JobsUserWebSessionController userController;
 
-       /**
-        * Login bean (controller)
-        */
-       @Inject
-       private JobsUserLoginWebSessionController userLoginController;
-
        /**
         * User name
         */
@@ -148,7 +142,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                } else if (this.getUserName().isEmpty()) {
                        // Is empty
                        throw new IllegalArgumentException("userName is null"); //NOI18N
-               } else if (this.adminHelper.getContact() == null) {
+               } else if (this.beanHelper.getContact() == null) {
                        // No contact instance set, so test required fields: gender, first name and family name
                        if (this.contactController.getGender() == null) {
                                // Throw NPE again
@@ -191,8 +185,17 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                user.setUserAccountStatus(UserAccountStatus.CONFIRMED);
                user.setUserProfileMode(ProfileMode.INVISIBLE);
 
-               // Create contact instance
-               Contact contact = this.contactController.createContactInstance();
+               // Init instance
+               Contact contact;
+
+               // Is a contact instance in helper set?
+               if (this.beanHelper.getContact() instanceof Contact) {
+                       // Then use it for contact linking
+                       contact = this.beanHelper.getContact();
+               } else {
+                       // Create contact instance
+                       contact = this.contactController.createContactInstance();
+               }
 
                // Set contact in user
                user.setUserContact(contact);
@@ -205,7 +208,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                if (this.userController.isUserNameRegistered(user)) {
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
-               } else if ((this.adminHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
+               } else if ((this.beanHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
                        // Email address is already used
                        throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
                } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
@@ -231,9 +234,12 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
 
                try {
                        // Now, that all is set, call EJB
-                       if (this.adminHelper.getContact() instanceof Contact) {
+                       if (this.beanHelper.getContact() instanceof Contact) {
                                // Link contact with this user
                                updatedUser = this.userBean.linkUser(user);
+
+                               // Remove contact instance
+                               this.beanHelper.setContact(null);
                        } else {
                                // Add new contact
                                updatedUser = this.userBean.addUser(user);
@@ -244,7 +250,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                }
 
                // Clear helper
-               this.adminHelper.setContact(null);
+               this.beanHelper.setContact(null);
 
                // Fire event
                this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser));
@@ -289,7 +295,7 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
        @Override
        public String editUserData () {
                // Get user instance
-               User user = this.adminHelper.getUser();
+               User user = this.beanHelper.getUser();
 
                // Null password means not setting it
                String encryptedPassword = null;
@@ -297,13 +303,13 @@ public class JobsAdminUserWebRequestBean extends BaseJobsController implements J
                // Check if user instance is in helper and valid
                if (null == user) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.user is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.user is null"); //NOI18N
                } else if (user.getUserId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.user.userId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.user.userId is null"); //NOI18N //NOI18N
                } else if (user.getUserId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N
                } else if (this.getUserName() == null) {
                        // Not all required fields are set
                        throw new NullPointerException("this.userName is null"); //NOI18N
index 89df936555ed68f6ef6538d279057000bc7a8791..b32b8f553be1757ca5b82eea71b3814a28493c54 100644 (file)
@@ -496,3 +496,10 @@ GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS=Bitte bei der Anmeldung verwendete Email-A
 GUEST_RESEND_CONFIRMATION_LINK_NOTICE=Der alte Best\u00e4tigungslink wird hiernach verfallen, bitte dann den aus der neueren Mail verwenden.
 RESEND_CONFIRMATION_LINK_LEGEND=Email-Adresse eingeben:
 RESEND_CONFIRMATION_LINK_LEGEND_TITLE=Bitte geben Sie Ihre Email-Adresse ein, die Sie bei der Anmeldung verwendet haben.
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Anmeldung best\u00e4tigen
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Benutzeranmeldung best\u00e4tigen:
+GUEST_CONFIRMATION_LINK_INVALID=Best\u00e4tigungslink nicht mehr g\u00fcltig. Bitte lassen Sie sich einen neuen Link zusenden oder wenden Sie sich an den Support.
+GUEST_CONFIRMATION_KEY_NOT_SET=Es wurde keine Best\u00e4tigungsschl\u00fcssel angegeben. Bitte pr\u00fcfen Sie den Link aus der Mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Vielen Dank f\u00fcr die Best\u00e4tigung
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hallo {0} {1} {2}. Sie haben soeben Ihren Account best\u00e4tigt. Es ist eine Mail mit weiteren Details an Sie unterwegs.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Account best\u00e4tigen
index abf1b1dd3cbdb611cddbb48f3393f32475de7f00..97e1210b259bc3d4ea40f1697c28177f2f694df6 100644 (file)
@@ -496,3 +496,10 @@ LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
 LINK_LOGIN_CHANGE_PASSWORD_TITLE=Change here your password, if you want another one.
 LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm registration
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm user registration:
+GUEST_CONFIRMATION_LINK_INVALID=Confirmation link is no longer valid. Please try to send a new link to your email address or contact support.
+GUEST_CONFIRMATION_KEY_NOT_SET=No confirmation key was provided. Please check the link from the mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Thank you for confirmation of your account
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hello {0} {1} {2}. You have successfully confirmed your account. An email with more details is on it's way to you.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Confirm account
index 799a19b601daa90efed17d3ae78014b6da9ddbd6..5e29f6f67cf6e545e9f591a704032f67cb07415e 100644 (file)
-<?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:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.contact}">
-               <f:facet name="header">
-                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">
-                               <f:param value="#{adminHelper.contact.contactId}" />
-                       </h:outputFormat>
-               </f:facet>
-
-               <h:column>
-                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
-
-                       <h:outputText id="contactId" styleClass="data_field" value="#{adminHelper.contact.contactId}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
-
-                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.contact.contactCreated.time}">
-                               <f:convertDateTime for="contactCreated" type="both" />
-                       </h:outputText>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
-
-                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.contact.contactUpdated.time}">
-                               <f:convertDateTime for="contactUpdated" type="both" />
-                       </h:outputText>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
-
-                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.contact.isOwnContact()}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
-
-                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[adminHelper.contact.contactGender.messageKey]}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
-
-                       <h:outputText id="contactTitle" styleClass="data_field" value="#{adminHelper.contact.contactTitle}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
-
-                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{adminHelper.contact.contactFirstName}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
-
-                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{adminHelper.contact.contactFamilyName}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
-
-                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.contact.contactStreet}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
-
-                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.contact.contactHouseNumber}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
-
-                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.contact.contactZipCode}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
-
-                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.contact.contactCity}" />
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
-
-                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{adminHelper.contact.contactEmailAddress}">
-                               <h:outputText value="#{adminHelper.contact.contactEmailAddress}" />
-                       </h:outputLink>
-               </h:column>
-
-               <h:column>
-                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
-
-                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.contact.contactBirthday.time}">
-                               <f:convertDateTime for="contactBirthday" type="date" />
-                       </h:outputText>
-               </h:column>
-       </h:panelGrid>
-</ui:composition>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<ui:composition\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:f="http://java.sun.com/jsf/core"\r
+       xmlns:h="http://java.sun.com/jsf/html"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">\r
+\r
+       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.contact}">\r
+               <f:facet name="header">\r
+                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">\r
+                               <f:param value="#{beanHelper.contact.contactId}" />\r
+                       </h:outputFormat>\r
+               </f:facet>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />\r
+\r
+                       <h:outputText id="contactId" styleClass="data_field" value="#{beanHelper.contact.contactId}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />\r
+\r
+                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.contact.contactCreated.time}">\r
+                               <f:convertDateTime for="contactCreated" type="both" />\r
+                       </h:outputText>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />\r
+\r
+                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.contact.contactUpdated.time}">\r
+                               <f:convertDateTime for="contactUpdated" type="both" />\r
+                       </h:outputText>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />\r
+\r
+                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.contact.isOwnContact()}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />\r
+\r
+                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.contact.contactGender.messageKey]}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />\r
+\r
+                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.contact.contactTitle}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />\r
+\r
+                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.contact.contactFirstName}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />\r
+\r
+                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.contact.contactFamilyName}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />\r
+\r
+                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.contact.contactStreet}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />\r
+\r
+                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.contact.contactHouseNumber}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />\r
+\r
+                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.contact.contactZipCode}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />\r
+\r
+                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.contact.contactCity}" />\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />\r
+\r
+                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">\r
+                               <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />\r
+                       </h:outputLink>\r
+               </h:column>\r
+\r
+               <h:column>\r
+                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />\r
+\r
+                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.contact.contactBirthday.time}">\r
+                               <f:convertDateTime for="contactBirthday" type="date" />\r
+                       </h:outputText>\r
+               </h:column>\r
+       </h:panelGrid>\r
+</ui:composition>\r
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
new file mode 100644 (file)
index 0000000..1e7e0a8
--- /dev/null
@@ -0,0 +1,22 @@
+<?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_page2_form">
+               <div class="table">
+                       <div class="table_header">
+                               #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" id="finish_registration" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index 043babe7dc4f839a4c601aab042db05f0d524445..df3087a7da0998dff0c929fe27b2f3553f2fc62b 100644 (file)
@@ -71,7 +71,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.doFinishRegistration()}" />
+                               <h:commandButton styleClass="submit" type="submit" id="finish_registration_single" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doFinishRegistration()}" />
                        </div>
                </div>
        </h:form>
index badc92e324eacf9d2a54fae2706acb3cc9768420..a3ae28a065eb3f9ce4b2f9b1750cc8ad3d9c0776 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.contact}">
+                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_TITLE}">
-                                                       <f:param value="#{adminHelper.contact.contactId}" />
+                                                       <f:param value="#{beanHelper.contact.contactId}" />
                                                </h:outputFormat>
                                        </div>
 
@@ -39,7 +39,7 @@
 
                                        <div class="table_footer">
                                                <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="delete_button" type="submit" id="register" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" />
+                                               <h:commandButton styleClass="delete_button" type="submit" id="delete_contact" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" />
                                        </div>
                                </div>
                        </h:form>
index 0ac502ada92c85d08c8dea858c15c28d2c339129..bd123b611586c6730886f4f54fcdbdcab8ecb6f6 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.contact}">
+                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_EDIT_CONTACT_TITLE}">
-                                                       <f:param value="#{adminHelper.contact.contactId}" />
+                                                       <f:param value="#{beanHelper.contact.contactId}" />
                                                </h:outputFormat>
                                        </div>
 
@@ -41,7 +41,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_ADMIN_EDIT_CONTACT}" action="#{adminContactController.editContactData()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_contact" value="#{msg.BUTTON_ADMIN_EDIT_CONTACT}" action="#{adminContactController.editContactData()}" />
                                        </div>
                                </div>
                        </h:form>
index 988217725e4dc404d179cf8dd532b9b850b288e6..bc9b16ede2057a659ea3000717e13a72d89d6ea0 100644 (file)
@@ -72,7 +72,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_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_contact" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" />
                                        </div>
                                </h:form>
                        </div>
index fccf2ebc89c850323668c2c2916792d5eb3a687b..28131f2002ca3320d458c4b62ffb72a944b0896b 100644 (file)
@@ -1,42 +1,42 @@
-<?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"
-       >
-
-       <f:metadata>
-               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyContactToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
-
-                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl">
-                                       <ui:param name="contact" value="#{adminHelper.contact}" />
-                               </ui:include>
-                       </div>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                                       <ui:param name="cellphoneNumber" value="#{adminHelper.contact.contactCellphoneNumber}" />
-                                       <ui:param name="contact" value="#{adminHelper.contact}" />
-                               </ui:include>
-                       </div>
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyContactToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />\r
+\r
+                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl">\r
+                                       <ui:param name="contact" value="#{beanHelper.contact}" />\r
+                               </ui:include>\r
+                       </div>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">\r
+                                       <ui:param name="cellphoneNumber" value="#{beanHelper.contact.contactCellphoneNumber}" />\r
+                                       <ui:param name="contact" value="#{beanHelper.contact}" />\r
+                               </ui:include>\r
+                       </div>\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 2d1722402f5227fee2059c4b9e0d4aaa1827d471..73737268ab3cd7d923e1d0df58c1d50108423235 100644 (file)
@@ -44,7 +44,7 @@
                                </h:column>
                        </h:dataTable>
 
-                       <h:form id="add_country">
+                       <h:form id="form_add_country">
                                <div class="table_medium">
                                        <div class="table_header">
                                                #{msg.ADMIN_ADD_COUNTRY_TITLE}
@@ -54,7 +54,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_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_country" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" />
                                        </div>
                                </div>
 
index bf450a76fc0ebf60ecde4f59dc2238e7a003da5f..ebb50f9447b3b7b9dc32d5522d853cdce755777e 100644 (file)
@@ -52,7 +52,7 @@
                                </h:column>
                        </h:dataTable>
 
-                       <h:form id="add_provider">
+                       <h:form id="form_add_mobile_provider">
                                <div class="table_medium">
                                        <div class="table_header">
                                                #{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}
@@ -62,7 +62,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_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_mobile_provider" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" />
                                        </div>
                                </div>
 
index 720c9033efa056f05a38d7bb9ac905c8cd14e2fc..bc0f33aaf6bbdf616f54fdcd76a294a43c73c45d 100644 (file)
@@ -1,29 +1,29 @@
-<?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"
-       >
-
-       <f:metadata>
-               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_DELETE_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_DELETE_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       Here goes your content.\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 1578ec171cc51cc9741e50f97d179e0558f01c5c..f7a826ff135b2c22d25e28b6ae3af4524cd2a1d3 100644 (file)
@@ -9,8 +9,8 @@
        >
 
        <f:metadata>
-               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />
        </f:metadata>
 
        <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
@@ -21,9 +21,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.user}">
+                       <h:form id="form_edit_user" rendered="#{not empty beanHelper.user}">
                                <div class="table">
                                        <div class="table_header">
                                                #{msg.ADMIN_EDIT_USER_TITLE}
@@ -39,7 +39,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_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="edit_user" value="#{msg.BUTTON_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" />
                                        </div>
                                </div>
                        </h:form>
index 3e05b27b4bb9ea661b940afc9d99535229c5ab44..236c3824c558d76ce7bb05f614395073a2135401 100644 (file)
@@ -86,7 +86,7 @@
                                                                </div>
 
                                                                <div class="table_right_medium">
-                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{adminHelper.contact}" converter="ContactConverter">
+                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{beanHelper.contact}" converter="ContactConverter">
                                                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
                                                                                <f:selectItems value="#{userController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
                                                                        </h:selectOneMenu>
 
                                        <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_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+                                               <h:commandButton styleClass="submit" type="submit" id="add_user" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
                                        </div>
                                </h:form>
                        </div>
index 927dfc9b74ad1f63eee940d94f4ad2454af3fed1..3eb471cb009a01cfb41fd0ab49bd596d68a21ae0 100644 (file)
-<?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"
-       >
-
-       <f:metadata>
-               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.user}">
-                               <f:facet name="header">
-                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
-                                               <f:param value="#{adminHelper.user.userName}" />
-                                               <f:param value="#{adminHelper.user.userId}" />
-                                       </h:outputFormat>
-                               </f:facet>
-
-                               <h:column>
-                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" />
-
-                                       <h:outputText id="userId" styleClass="data_field" value="#{adminHelper.user.userId}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />
-
-                                       <h:outputText id="userName" styleClass="data_field" value="#{adminHelper.user.userName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" />
-
-                                       <h:outputText id="userCreated" styleClass="data_field" value="#{adminHelper.user.userCreated.time}">
-                                               <f:convertDateTime for="userCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" />
-
-                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{adminHelper.user.userUpdated.time}">
-                                               <f:convertDateTime for="userUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />
-
-                                       <h:outputText id="userAccountStatus" styleClass="data_field #{adminHelper.user.userAccountStatus.styleClass}" value="#{msg[adminHelper.user.userAccountStatus.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_USER_PROFILE_MODE}" />
-
-                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[adminHelper.user.userProfileMode.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" />
-
-                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{adminHelper.user.userLastLocked.time}">
-                                               <f:convertDateTime for="userLastLocked" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />
-
-                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{adminHelper.user.userLastLockedReason}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" />
-
-                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{adminHelper.user.userContact.contactCreated.time}">
-                                               <f:convertDateTime for="contactCreated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" />
-
-                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{adminHelper.user.userContact.contactUpdated.time}">
-                                               <f:convertDateTime for="contactUpdated" type="both" />
-                                       </h:outputText>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
-
-                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.user.userContact.isOwnContact()}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
-
-                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[adminHelper.user.userContact.contactGender.messageKey]}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
-
-                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{adminHelper.user.userContact.contactTitle}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
-
-                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{adminHelper.user.userContact.contactFirstName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
-
-                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{adminHelper.user.userContact.contactFamilyName}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />
-
-                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{adminHelper.user.userContact.contactStreet}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />
-
-                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{adminHelper.user.userContact.contactHouseNumber}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />
-
-                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{adminHelper.user.userContact.contactZipCode}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />
-
-                                       <h:outputText id="contactCity" styleClass="data_field" value="#{adminHelper.user.userContact.contactCity}" />
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
-
-                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{adminHelper.user.userContact.contactEmailAddress}">
-                                               <h:outputText value="#{adminHelper.user.userContact.contactEmailAddress}" />
-                                       </h:outputLink>
-                               </h:column>
-
-                               <h:column>
-                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
-
-                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.user.userContact.contactBirthday.time}">
-                                               <f:convertDateTime for="contactBirthday" type="date" />
-                                       </h:outputText>
-                               </h:column>
-                       </h:panelGrid>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">
-                                       <ui:param name="user" value="#{adminHelper.user}" />
-                               </ui:include>
-                       </div>
-
-                       <div>
-                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
-                                       <ui:param name="cellphoneNumber" value="#{adminHelper.user.userContact.contactCellphoneNumber}" />
-                                       <ui:param name="contact" value="#{adminHelper.user.userContact}" />
-                               </ui:include>
-                       </div>
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_SHOW_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.user}">\r
+                               <f:facet name="header">\r
+                                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">\r
+                                               <f:param value="#{beanHelper.user.userName}" />\r
+                                               <f:param value="#{beanHelper.user.userId}" />\r
+                                       </h:outputFormat>\r
+                               </f:facet>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" />\r
+\r
+                                       <h:outputText id="userId" styleClass="data_field" value="#{beanHelper.user.userId}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />\r
+\r
+                                       <h:outputText id="userName" styleClass="data_field" value="#{beanHelper.user.userName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" />\r
+\r
+                                       <h:outputText id="userCreated" styleClass="data_field" value="#{beanHelper.user.userCreated.time}">\r
+                                               <f:convertDateTime for="userCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" />\r
+\r
+                                       <h:outputText id="userUpdated" styleClass="data_field" value="#{beanHelper.user.userUpdated.time}">\r
+                                               <f:convertDateTime for="userUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />\r
+\r
+                                       <h:outputText id="userAccountStatus" styleClass="data_field #{beanHelper.user.userAccountStatus.styleClass}" value="#{msg[beanHelper.user.userAccountStatus.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_USER_PROFILE_MODE}" />\r
+\r
+                                       <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[beanHelper.user.userProfileMode.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" />\r
+\r
+                                       <h:outputText id="userLastLocked" styleClass="data_field" value="#{beanHelper.user.userLastLocked.time}">\r
+                                               <f:convertDateTime for="userLastLocked" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" />\r
+\r
+                                       <h:outputText id="lastLockedReason" styleClass="data_field" value="#{beanHelper.user.userLastLockedReason}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" />\r
+\r
+                                       <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.user.userContact.contactCreated.time}">\r
+                                               <f:convertDateTime for="contactCreated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" />\r
+\r
+                                       <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.user.userContact.contactUpdated.time}">\r
+                                               <f:convertDateTime for="contactUpdated" type="both" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />\r
+\r
+                                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.user.userContact.isOwnContact()}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />\r
+\r
+                                       <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />\r
+\r
+                                       <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.user.userContact.contactTitle}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />\r
+\r
+                                       <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFirstName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />\r
+\r
+                                       <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFamilyName}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" />\r
+\r
+                                       <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.user.userContact.contactStreet}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" />\r
+\r
+                                       <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.user.userContact.contactHouseNumber}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" />\r
+\r
+                                       <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.user.userContact.contactZipCode}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" />\r
+\r
+                                       <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.user.userContact.contactCity}" />\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />\r
+\r
+                                       <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.user.userContact.contactEmailAddress}">\r
+                                               <h:outputText value="#{beanHelper.user.userContact.contactEmailAddress}" />\r
+                                       </h:outputLink>\r
+                               </h:column>\r
+\r
+                               <h:column>\r
+                                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />\r
+\r
+                                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.user.userContact.contactBirthday.time}">\r
+                                               <f:convertDateTime for="contactBirthday" type="date" />\r
+                                       </h:outputText>\r
+                               </h:column>\r
+                       </h:panelGrid>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl">\r
+                                       <ui:param name="user" value="#{beanHelper.user}" />\r
+                               </ui:include>\r
+                       </div>\r
+\r
+                       <div>\r
+                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">\r
+                                       <ui:param name="cellphoneNumber" value="#{beanHelper.user.userContact.contactCellphoneNumber}" />\r
+                                       <ui:param name="contact" value="#{beanHelper.user.userContact}" />\r
+                               </ui:include>\r
+                       </div>\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
index 7b33fdaa463d22fbcf5b7ac0420c18115b2b0b74..f5df7f75567d9d59e0ec50093518138f78137ce0 100644 (file)
@@ -1,29 +1,29 @@
-<?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"
-       >
-
-       <f:metadata>
-               <f:viewParam name="userId" value="#{adminHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
-               <f:viewAction action="#{adminHelper.copyUserToController()}" />
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
-               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}
-               </ui:define>
-
-               <ui:define name="content">
-                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty adminHelper.user}" />
-
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
+<?xml version="1.0" encoding="UTF-8" ?>\r
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r
+<html\r
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"\r
+       xmlns="http://www.w3.org/1999/xhtml"\r
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"\r
+       xmlns:h="http://xmlns.jcp.org/jsf/html"\r
+       xmlns:f="http://xmlns.jcp.org/jsf/core"\r
+       >\r
+\r
+       <f:metadata>\r
+               <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />\r
+               <f:viewAction action="#{beanHelper.copyUserToController()}" />\r
+       </f:metadata>\r
+\r
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">\r
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define>\r
+\r
+               <ui:define name="content_header">\r
+                       #{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}\r
+               </ui:define>\r
+\r
+               <ui:define name="content">\r
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />\r
+\r
+                       Here goes your content.\r
+               </ui:define>\r
+       </ui:composition>\r
+</html>\r
diff --git a/web/guest/user/confirm_account.xhtml b/web/guest/user/confirm_account.xhtml
new file mode 100644 (file)
index 0000000..8b6a457
--- /dev/null
@@ -0,0 +1,51 @@
+<?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"
+       >
+
+       <f:metadata>
+               <f:viewParam name="confirmKey" value="#{confirmationLinkController.confirmationKey}" />
+               <f:viewAction onPostback="true" action="#{confirmationLinkController.maybeConfirmUserAccount()}" />
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_CONFIRM_ACCOUNT}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{not empty confirmationLinkController.confirmationKey}">
+                               <ui:fragment rendered="#{not empty beanHelper.user}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{msg.GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE}" />
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <h:outputFormat value="#{msg.GUEST_USER_CONFIRM_ACCOUNT_DONE}">
+                                                               <f:param value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
+                                                               <f:param value="#{beanHelper.user.userContact.contactFirstName}" />
+                                                               <f:param value="#{beanHelper.user.userContact.contactFamilyName}" />
+                                                       </h:outputFormat>
+                                               </div>
+                                       </div>
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{empty beanHelper.user}">
+                                       <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" />
+                               </ui:fragment>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{empty confirmationLinkController.confirmationKey}">
+                               <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
index 6d5c617360854cf06310b9543f903524e45c0b76..02d6c5cbe5aa697c49ebb3f716c5c69244208960 100644 (file)
@@ -17,7 +17,7 @@
 
                <ui:define name="content">
                        <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
-                               <h:form id="resend_link_form">
+                               <h:form id="form_resend_link">
                                        <div class="table">
                                                <div class="table_header">
                                                        <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" />
@@ -49,7 +49,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_RESEND_CONFIRMATION_LINK}" action="#{resendController.doResendLink()}" />
+                                                       <h:commandButton styleClass="submit" type="submit" id="resend_link" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{resendController.doResendLink()}" />
                                                </div>
                                        </div>
                                </h:form>