]> git.mxchange.org Git - addressbook-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>
Sat, 21 May 2016 12:29:48 +0000 (14:29 +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/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/contact/AddressbookAdminContactWebRequestBean.java
src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java [deleted file]
src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java [deleted file]
src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestController.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelper.java [new file with mode: 0644]
src/java/org/mxchange/addressbook/beans/user/AddressbookAdminUserWebRequestBean.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/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestBean.java
new file mode 100644 (file)
index 0000000..b8008ae
--- /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.addressbook.beans.confirmlink;
+
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Objects;
+import javax.enterprise.context.RequestScoped;
+import javax.faces.view.facelets.FaceletException;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import org.mxchange.addressbook.beans.BaseAddressbookController;
+import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController;
+import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
+import org.mxchange.jcoreee.utils.FacesUtils;
+import org.mxchange.jusercore.exceptions.UserStatusConfirmedException;
+import org.mxchange.jusercore.exceptions.UserStatusLockedException;
+import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.UserSessionBeanRemote;
+import org.mxchange.jusercore.model.user.status.UserAccountStatus;
+
+/**
+ * A web request bean for confirmation link handling
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("confirmationLinkController")
+@RequestScoped
+public class AddressbookConfirmationLinkWebRequestBean extends BaseAddressbookController implements AddressbookConfirmationLinkWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 57_637_182_796_370L;
+
+       /**
+        * Admin helper instance
+        */
+       @Inject
+       private AddressbookWebRequestController beanHelper;
+
+       /**
+        * Confirmation key
+        */
+       private String confirmationKey;
+
+       /**
+        * Remote user bean
+        */
+       private final UserSessionBeanRemote userBean;
+
+       /**
+        * User controller
+        */
+       @Inject
+       private AddressbookUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public AddressbookConfirmationLinkWebRequestBean () {
+               // Try it
+               try {
+                       // Get initial context
+                       Context context = new InitialContext();
+
+                       // Try to lookup
+                       this.userBean = (UserSessionBeanRemote) context.lookup("java:global/jlandingpage-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
+               } catch (final NamingException e) {
+                       // Throw again
+                       throw new FaceletException(e);
+               }
+       }
+
+       @Override
+       public String getConfirmationKey () {
+               return this.confirmationKey;
+       }
+
+       @Override
+       public void setConfirmationKey (final String confirmationKey) {
+               this.confirmationKey = confirmationKey;
+       }
+
+       @Override
+       public void maybeConfirmUserAccount () {
+               // Is the confirmation key set?
+               if (this.getConfirmationKey() == null) {
+                       // May be null if not set
+                       return;
+               } else if (this.getConfirmationKey().isEmpty()) {
+                       // Is empty string
+                       return;
+               }
+
+               // Now try to find the user in user list, first get the whole list
+               List<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/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java b/src/java/org/mxchange/addressbook/beans/confirmlink/AddressbookConfirmationLinkWebRequestController.java
new file mode 100644 (file)
index 0000000..7f333b2
--- /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.addressbook.beans.confirmlink;
+
+import java.io.Serializable;
+
+/**
+ * An interface for an email change controller
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+public interface AddressbookConfirmationLinkWebRequestController 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 7b7b9bc47bdb06cffe4277d2e30d633da5428102..cd91f9a2752f7e7c29eab96e6c19c189e7d0476d 100644 (file)
@@ -30,7 +30,7 @@ import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.BaseAddressbookController;
-import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController;
+import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController;
 import org.mxchange.jcontacts.contact.Contact;
 import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 import org.mxchange.jcontacts.contact.UserContact;
@@ -75,7 +75,7 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro
         * Admin helper instance
         */
        @Inject
-       private AddressbookAdminWebRequestController adminHelper;
+       private AddressbookWebRequestController beanHelper;
 
        /**
         * Birth day
@@ -352,13 +352,13 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro
                // Check if contact instance is in helper and valid
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.contact is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.contact is null"); //NOI18N
                } else if (contact.getContactId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
                } else if (contact.getContactId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
                }
 
                // Update all data in contact
@@ -380,18 +380,18 @@ public class AddressbookAdminContactWebRequestBean extends BaseAddressbookContro
        @Override
        public String editContactData () {
                // Get contact instance
-               Contact contact = this.adminHelper.getContact();
+               Contact contact = this.beanHelper.getContact();
 
                // Check if contact instance is in helper and valid
                if (null == contact) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.contact is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.contact is null"); //NOI18N
                } else if (contact.getContactId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.contact.contactId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.contact.contactId is null"); //NOI18N //NOI18N
                } else if (contact.getContactId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.contact.contactId={0} is invalid", contact.getContactId())); //NOI18N
                }
 
                // Update all data in contact
diff --git a/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestController.java
deleted file mode 100644 (file)
index fd0cfc1..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.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 AddressbookAdminWebRequestController 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/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookAdminWebRequestHelper.java
deleted file mode 100644 (file)
index 1994116..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (C) 2016 Roland Haeder GmbH
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.addressbook.beans.helper;
-
-import java.text.MessageFormat;
-import javax.enterprise.context.RequestScoped;
-import javax.inject.Inject;
-import javax.inject.Named;
-import org.mxchange.addressbook.beans.contact.AddressbookAdminContactWebRequestController;
-import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
-import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jusercore.model.user.User;
-
-/**
- * A general helper for beans
- * <p>
- * @author Roland Haeder<roland@mxchange.org>
- */
-@Named ("adminHelper")
-@RequestScoped
-public class AddressbookAdminWebRequestHelper implements AddressbookAdminWebRequestController {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 17_258_793_567_145_701L;
-
-       /**
-        * Regular contact controller
-        */
-       @Inject
-       private AddressbookAdminContactWebRequestController adminContactController;
-
-       /**
-        * Contact instance
-        */
-       private Contact contact;
-
-       /**
-        * User instance
-        */
-       private User user;
-
-       /**
-        * Regular user controller
-        */
-       @Inject
-       private AddressbookUserWebSessionController userController;
-
-       /**
-        * Default constructor
-        */
-       public AddressbookAdminWebRequestHelper () {
-       }
-
-       @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"); //NOI18N
-               } else if (this.getUser().getUserId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("this.user.userId is null"); //NOI18N
-               } else if (this.getUser().getUserId() < 1) {
-                       // Not valid
-                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId())); //NOI18N
-               }
-
-               // 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/addressbook/beans/helper/AddressbookWebRequestController.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestController.java
new file mode 100644 (file)
index 0000000..e20f243
--- /dev/null
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2016 Roland Haeder GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.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 AddressbookWebRequestController 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/addressbook/beans/helper/AddressbookWebRequestHelper.java b/src/java/org/mxchange/addressbook/beans/helper/AddressbookWebRequestHelper.java
new file mode 100644 (file)
index 0000000..f33ff62
--- /dev/null
@@ -0,0 +1,168 @@
+/*
+ * Copyright (C) 2016 Roland Haeder GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.addressbook.beans.helper;
+
+import java.text.MessageFormat;
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+import org.mxchange.addressbook.beans.contact.AddressbookAdminContactWebRequestController;
+import org.mxchange.addressbook.beans.user.AddressbookUserWebSessionController;
+import org.mxchange.jcontacts.contact.Contact;
+import org.mxchange.jusercore.model.user.User;
+
+/**
+ * A general helper for beans
+ * <p>
+ * @author Roland Haeder<roland@mxchange.org>
+ */
+@Named ("adminHelper")
+@RequestScoped
+public class AddressbookWebRequestHelper implements AddressbookWebRequestController {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 17_258_793_567_145_701L;
+
+       /**
+        * Regular contact controller
+        */
+       @Inject
+       private AddressbookAdminContactWebRequestController adminContactController;
+
+       /**
+        * Contact instance
+        */
+       private Contact contact;
+
+       /**
+        * User instance
+        */
+       private User user;
+
+       /**
+        * Regular user controller
+        */
+       @Inject
+       private AddressbookUserWebSessionController userController;
+
+       /**
+        * Default constructor
+        */
+       public AddressbookWebRequestHelper () {
+       }
+
+       @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"); //NOI18N
+               } else if (this.getUser().getUserId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("this.user.userId is null"); //NOI18N
+               } else if (this.getUser().getUserId() < 1) {
+                       // Not valid
+                       throw new IllegalStateException(MessageFormat.format("this.user.userId={0} is not valid.", this.getUser().getUserId())); //NOI18N
+               }
+
+               // 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 5273cf87a9ea2541f590df40021f17026b2a3d1a..c42460d15c13d7d60a49dffd7f1a6274c9e02860 100644 (file)
@@ -31,10 +31,8 @@ import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import org.mxchange.addressbook.beans.BaseAddressbookController;
 import org.mxchange.addressbook.beans.contact.AddressbookContactWebSessionController;
-import org.mxchange.addressbook.beans.helper.AddressbookAdminWebRequestController;
-import org.mxchange.addressbook.beans.login.AddressbookUserLoginWebSessionController;
+import org.mxchange.addressbook.beans.helper.AddressbookWebRequestController;
 import org.mxchange.jcontacts.contact.Contact;
-import org.mxchange.jcontacts.contact.ContactSessionBeanRemote;
 import org.mxchange.jusercore.container.login.UserLoginContainer;
 import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
 import org.mxchange.jusercore.events.user.add.AdminAddedUserEvent;
@@ -73,15 +71,10 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
        private Event<AdminAddedUserEvent> addedUserEvent;
 
        /**
-        * Admin helper instance
+        * Bean helper instance
         */
        @Inject
-       private AddressbookAdminWebRequestController adminHelper;
-
-       /**
-        * Remote user bean
-        */
-       private final ContactSessionBeanRemote contactBean;
+       private AddressbookWebRequestController beanHelper;
 
        /**
         * Regular contact controller
@@ -107,12 +100,6 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
        @Inject
        private AddressbookUserWebSessionController userController;
 
-       /**
-        * Login bean (controller)
-        */
-       @Inject
-       private AddressbookUserLoginWebSessionController userLoginController;
-
        /**
         * User name
         */
@@ -139,9 +126,6 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
 
                        // Try to lookup
                        this.userBean = (UserSessionBeanRemote) context.lookup("java:global/addressbook-ejb/user!org.mxchange.jusercore.model.user.UserSessionBeanRemote"); //NOI18N
-
-                       // Try to lookup
-                       this.contactBean = (ContactSessionBeanRemote) context.lookup("java:global/addressbook-ejb/contact!org.mxchange.jcontacts.contact.ContactSessionBeanRemote"); //NOI18N
                } catch (final NamingException e) {
                        // Throw again
                        throw new FaceletException(e);
@@ -160,7 +144,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                } else if (this.getUserName().isEmpty()) {
                        // Is empty
                        throw new IllegalArgumentException("userName is null"); //NOI18N
-               } else if (this.adminHelper.getContact() == null) {
+               } else if (this.beanHelper.getContact() == null) {
                        // No contact instance set, so test required fields: gender, first name and family name
                        if (this.contactController.getGender() == null) {
                                // Throw NPE again
@@ -204,9 +188,9 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                Contact contact;
 
                // Is a contact instance in helper set?
-               if (this.adminHelper.getContact() instanceof Contact) {
+               if (this.beanHelper.getContact() instanceof Contact) {
                        // Then use it for contact linking
-                       contact = this.adminHelper.getContact();
+                       contact = this.beanHelper.getContact();
                } else {
                        // Create contact instance
                        contact = this.contactController.createContactInstance();
@@ -223,7 +207,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                if (this.userController.isUserNameRegistered(user)) {
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
-               } else if ((this.adminHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
+               } else if ((this.beanHelper.getContact() == null) && (this.contactController.isEmailAddressRegistered(user.getUserContact()))) {
                        // Email address is already used
                        throw new FaceletException(new EmailAddressAlreadyRegisteredException(user));
                } else if ((this.getUserPassword() == null && (this.getUserPasswordRepeat() == null)) || ((this.getUserPassword().isEmpty()) && (this.getUserPasswordRepeat().isEmpty()))) {
@@ -249,12 +233,12 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
 
                try {
                        // Now, that all is set, call EJB
-                       if (this.adminHelper.getContact() instanceof Contact) {
+                       if (this.beanHelper.getContact() instanceof Contact) {
                                // Link contact with this user
                                updatedUser = this.userBean.linkUser(user);
 
                                // Remove contact instance
-                               this.adminHelper.setContact(null);
+                               this.beanHelper.setContact(null);
                        } else {
                                // Add new contact
                                updatedUser = this.userBean.addUser(user);
@@ -265,7 +249,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                }
 
                // Clear helper
-               this.adminHelper.setContact(null);
+               this.beanHelper.setContact(null);
 
                // Fire event
                this.addedUserEvent.fire(new AdminUserAddedEvent(updatedUser));
@@ -313,7 +297,7 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
        @Override
        public String editUserData () {
                // Get user instance
-               User user = this.adminHelper.getUser();
+               User user = this.beanHelper.getUser();
 
                // Null password means not setting it
                String encryptedPassword = null;
@@ -321,13 +305,13 @@ public class AddressbookAdminUserWebRequestBean extends BaseAddressbookControlle
                // Check if user instance is in helper and valid
                if (null == user) {
                        // Throw NPE
-                       throw new NullPointerException("adminHelper.user is null"); //NOI18N
+                       throw new NullPointerException("beanHelper.user is null"); //NOI18N
                } else if (user.getUserId() == null) {
                        // Throw NPE again
-                       throw new NullPointerException("adminHelper.user.userId is null"); //NOI18N //NOI18N
+                       throw new NullPointerException("beanHelper.user.userId is null"); //NOI18N //NOI18N
                } else if (user.getUserId() < 1) {
                        // Invalid id
-                       throw new IllegalStateException(MessageFormat.format("adminHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N
+                       throw new IllegalStateException(MessageFormat.format("beanHelper.user.userId={0} is invalid", user.getUserId())); //NOI18N //NOI18N
                } else if (this.getUserName() == null) {
                        // Not all required fields are set
                        throw new NullPointerException("this.userName is null"); //NOI18N
index 4f941c12af3614ca4fc621617560d960634f5965..45bc8fe44edd6c4bedcfa2b645e7aecd19b5c495 100644 (file)
@@ -530,3 +530,10 @@ GUEST_RESEND_LINK_ENTER_EMAIL_ADDRESS=Bitte bei der Anmeldung verwendete Email-A
 GUEST_RESEND_CONFIRMATION_LINK_NOTICE=Der alte Best\u00e4tigungslink wird hiernach verfallen, bitte dann den aus der neueren Mail verwenden.
 RESEND_CONFIRMATION_LINK_LEGEND=Email-Adresse eingeben:
 RESEND_CONFIRMATION_LINK_LEGEND_TITLE=Bitte geben Sie Ihre Email-Adresse ein, die Sie bei der Anmeldung verwendet haben.
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Anmeldung best\u00e4tigen
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Benutzeranmeldung best\u00e4tigen:
+GUEST_CONFIRMATION_LINK_INVALID=Best\u00e4tigungslink nicht mehr g\u00fcltig. Bitte lassen Sie sich einen neuen Link zusenden oder wenden Sie sich an den Support.
+GUEST_CONFIRMATION_KEY_NOT_SET=Es wurde keine Best\u00e4tigungsschl\u00fcssel angegeben. Bitte pr\u00fcfen Sie den Link aus der Mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Vielen Dank f\u00fcr die Best\u00e4tigung
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hallo {0} {1} {2}. Sie haben soeben Ihren Account best\u00e4tigt. Es ist eine Mail mit weiteren Details an Sie unterwegs.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Account best\u00e4tigen
index 8507135351a74ce31b29a7bc5a3ecc6cca654fbd..c47713844417b4048595130cdd1294f4f8abfd4c 100644 (file)
@@ -527,3 +527,10 @@ LOGIN_CHANGE_PERSONAL_DATA_TITLE=Change personal data:
 LINK_LOGIN_CHANGE_PASSWORD_TITLE=Change here your password, if you want another one.
 LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
+PAGE_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm registration
+CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT=Confirm user registration:
+GUEST_CONFIRMATION_LINK_INVALID=Confirmation link is no longer valid. Please try to send a new link to your email address or contact support.
+GUEST_CONFIRMATION_KEY_NOT_SET=No confirmation key was provided. Please check the link from the mail.
+GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE=Thank you for confirmation of your account
+GUEST_USER_CONFIRM_ACCOUNT_DONE=Hello {0} {1} {2}. You have successfully confirmed your account. An email with more details is on it's way to you.
+BUTTON_GUEST_CONFIRM_USER_ACCOUNT=Confirm account
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 a139d35f9eff32242abf2ae3766991c918e0f9d1..66ac419941d1ced0553164b27f4e65099e11135c 100644 (file)
@@ -46,7 +46,7 @@
                                <h:column>
                                        <f:facet name="header">#{msg.ADMIN_CONTACT_USAGE}</f:facet>
 
-                                       <h:outputText value="#{msg[adminHelper.getUserCustomerUsageMessageKey(contact)]}" />
+                                       <h:outputText value="#{msg[beanHelper.getUserCustomerUsageMessageKey(contact)]}" />
                                </h:column>
 
                                <h:column>
@@ -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 e94cbf5f3ef4594ebee14afdf947f789dc11f5de..15564acefeef2ffbc378a561308142c95d3d987e 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>