]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued with fixes/rewrites:
authorRoland Häder <roland@mxchange.org>
Mon, 2 May 2016 13:52:12 +0000 (15:52 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 13 May 2016 20:22:19 +0000 (22:22 +0200)
- moved+renamed generic/form_personal_data.tpl contact/form_contact_data.tpl
- renamed emailAddress1 -> emailAddress + emailAddress2 -> emailAddressRepeat
- clear bean after all, so no new object is needed

Signed-off-by: Roland Häder <roland@haeder.net>
Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/addressbook/beans/contact/AddressbookContactWebSessionBean.java
src/java/org/mxchange/addressbook/beans/email_address/AddressbookEmailChangeWebSessionBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/generic/form_personal_data.tpl [deleted file]
web/WEB-INF/templates/guest/user/guest_registration_form.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl [new file with mode: 0644]
web/user/login_change_email_address.xhtml

index 397f039a28abe38fe77dce39cfe28e34693ee9df..6dcff57207fa1feb016b8c36839955df802f6989 100644 (file)
@@ -760,6 +760,19 @@ public class AddressbookContactWebSessionBean implements AddressbookContactWebSe
 
        @Override
        public boolean isEmailAddressRegistered (final Contact contact) {
+               // Cherck parameter
+               if (null == contact) {
+                       // Throw NPE
+                       throw new NullPointerException("contact is null"); //NOI18N
+               } else if (contact.getContactEmailAddress() == null) {
+                       // Throw again
+                       throw new NullPointerException("contact.contactEmailAddress is null"); //NOI18N
+               } else if (contact.getContactEmailAddress().isEmpty()) {
+                       // Is empty
+                       throw new IllegalArgumentException("contact.contactEmailAddress is empty."); //NOI18N
+               }
+
+               // Determine it
                return ((this.emailAddressList instanceof List) && (this.emailAddressList.contains(contact.getContactEmailAddress())));
        }
 
index 0c8956d0ef5ccee2667cebb2c47e1bb7d9af746a..084fe843884cdb8f7f1229c9478f297f24497698 100644 (file)
@@ -122,23 +122,20 @@ public class AddressbookEmailChangeWebSessionBean implements AddressbookEmailCha
                assert (user.getUserContact().getContactId() instanceof Long) : "Instance loginController.userContact.contactId is null"; //NOI18N
                assert (user.getUserContact().getContactId() > 0) : MessageFormat.format("Instance loginController.userContact.contactId={0} is invalid", user.getUserContact().getContactId()); //NOI18N
 
-               // Get dummy email address
-               String dummyEmail = this.getEmailAddress();
-
-               // Unset all so the user is forced to re-enter it
-               this.clear();
-
                // Check if the email address is already enqueued
-               if (this.isEmailAddressQueued(dummyEmail)) {
+               if (this.isEmailAddressQueued(this.getEmailAddress())) {
                        // Yes, then abort here
                        return "login_email_already_added"; //NOI18N
                }
 
                // Create change object, to save EJB calls, the hash is not generated here
-               ChangeableEmailAddress emailAddress = new EmailAddressChange(user, dummyEmail);
+               ChangeableEmailAddress emailChange = new EmailAddressChange(user, this.getEmailAddress());
 
                // Call EJB
-               this.emailBean.enqueueEmailAddressForChange(emailAddress);
+               this.emailBean.enqueueEmailAddressForChange(emailChange);
+
+               // Unset all so the user is forced to re-enter it
+               this.clear();
 
                // All fine
                return "login_email_change_queued"; //NOI18N
index d2bc81852ce32eb148bf5a18f8578646a2dd02b1..3e7f5ef2d031c3f45132f2477fa3050c3464bb26 100644 (file)
@@ -258,8 +258,24 @@ LOGIN_CHANGE_EMAIL_LEGEND=Email-Adresse aendern:
 #TODO: Please fix German umlaut!
 LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Hier koennen Sie Ihre Email-Adresse aendern. Dazu muessen Sie diese zweimal eingeben und die neue Adresse bestaetigen.
 LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Ihre derzeitige Email-Adresse:
-LOGIN_CHANGE_EMAIL_ENTER_EMAIL1=Neue Email-Adresse eingeben:
-LOGIN_CHANGE_EMAIL_ENTER_EMAIL2=Neue Email-Adresse wiederholen:
+LOGIN_CHANGE_EMAIL_ENTER_EMAIL=Neue Email-Adresse eingeben:
+LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT=Neue Email-Adresse wiederholen:
+#TODO: Please fix German umlaut!
+BUTTON_CHANGE_EMAIL_ADDRESS=Email-Adresse aendern
+#TODO: Please fix German umlaut!
+PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Aendern Ihrer Email-Adresse
+CONTENT_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Neue Email-Adresse eingeben:
+#TODO: Please fix German umlaut!
+PAGE_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Ihre persoenlichen Daten aendern
+#TODO: Please fix German umlaut!
+CONTENT_TITLE_LOGIN_CHANGE_PERSONAL_DATA=Aendern Ihrer Adresse, Telefonnummer usw.:
+LOGIN_MESSAGE_DATA_SAVED=Daten wurden gespeichert.
+PAGE_TITLE_LOGIN_DATA_SAVED=Ihre Daten wurden gespeichert
+CONTENT_TITLE_LOGIN_DATA_SAVED=Daten wurden gespeichert:
+LOGIN_CHANGE_EMAIL_ADDRESS_TITLE=\u00c4ndern Sie Ihre Email-Adresse:
+LOGIN_CHANGE_EMAIL_LEGEND=Email-Adresse \u00e4ndern:
+LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Hier k\u00f6nnen Sie Ihre Email-Adresse \u00e4ndern. Dazu m\u00fcssen Sie diese zweimal eingeben und die neue Adresse best\u00e4tigen.
+LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Ihre derzeitige Email-Adresse:
 #TODO: Please fix German umlaut!
 BUTTON_CHANGE_EMAIL_ADDRESS=Email-Adresse aendern
 #TODO: Please fix German umlaut!
index 4450e7f548d6ea55370f18ffc8562072f52ef7fa..2f16e3301ca350551e84e487633c12f34ad965b8 100644 (file)
@@ -246,8 +246,8 @@ LOGIN_CHANGE_EMAIL_ADDRESS_TITLE=Change your email address:
 LOGIN_CHANGE_EMAIL_LEGEND=Change email address:
 LOGIN_CHANGE_EMAIL_LEGEND_TITLE=Here you can change your email address. You can do this by entering it twice and then confirm the new one.
 LOGIN_CHANGE_EMAIL_OLD_ADDRESS=Your current email address:
-LOGIN_CHANGE_EMAIL_ENTER_EMAIL1=Enter new email address:
-LOGIN_CHANGE_EMAIL_ENTER_EMAIL2=Repeat new email address:
+LOGIN_CHANGE_EMAIL_ENTER_EMAIL=Enter new email address:
+LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT=Repeat new email address:
 BUTTON_CHANGE_EMAIL_ADDRESS=Change email address
 PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
 CONTENT_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS=Enter new email address:
@@ -369,9 +369,6 @@ ADMIN_LIST_USER_CREATED=Registered:
 USER_ACCOUNT_STATUS_CONFIRMED=Confirmed
 USER_ACCOUNT_STATUS_UNCONFIRMED=Unconfirmed
 USER_ACCOUNT_STATUS_LOCKED=Locked
-USER_PROFILE_MODE_INVISIBLE=Invisible
-USER_PROFILE_MODE_MEMBERS=Only members
-USER_PROFILE_MODE_PUBLIC=Public
 ADMIN_LINK_SHOW_USER_TITLE=Show administrative user profile
 PAGE_TITLE_ADMIN_SHOW_USER=Show user profile
 CONTENT_TITLE_ADMIN_SHOW_USER=Show profile of a user:
diff --git a/web/WEB-INF/templates/generic/form_personal_data.tpl b/web/WEB-INF/templates/generic/form_personal_data.tpl
deleted file mode 100644 (file)
index dd60568..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-<?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">
-
-       <div class="para notice">
-               #{msg.PERSONAL_DATA_MINIMUM_NOTICE}
-       </div>
-
-       <div class="para">
-               <fieldset id="personal_data">
-                       <legend title="#{msg.PERSONAL_DATA_LEGEND_TITLE}">#{msg.PERSONAL_DATA_LEGEND}</legend>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="gender" value="#{msg.PERSONAL_DATA_GENDER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/gender_selection_box.tpl">
-                                               <ui:param  name="targetController" value="#{contactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="firstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="firstName" size="10" maxlength="255" value="#{contactController.firstName}" required="true">
-                                               <f:validator for="firstName" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="familyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="familyName" size="10" maxlength="255" value="#{contactController.familyName}" required="true">
-                                               <f:validator for="familyName" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="street" value="#{msg.PERSONAL_DATA_STREET}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="street" size="20" maxlength="255" value="#{contactController.street}" required="true">
-                                               <f:validator for="street" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="houseNumber" value="#{msg.PERSONAL_DATA_HOUSE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="houseNumber" size="3" maxlength="5" value="#{contactController.houseNumber}" required="true" validatorMessage="#{msg.ENTERED_HOUSE_NUMBER_INVALID}">
-                                               <f:validateLongRange for="houseNumber" minimum="1" maximum="500" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="zipCode" value="#{msg.PERSONAL_DATA_ZIP_CODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="zipCode" size="5" maxlength="6" value="#{contactController.zipCode}" required="true" validatorMessage="#{msg.ENTERED_ZIP_CODE_INVALID}">
-                                               <f:validateLongRange for="zipCode" minimum="1" maximum="99999" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="city" value="#{msg.PERSONAL_DATA_CITY}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:inputText styleClass="input" id="city" size="10" maxlength="255" value="#{contactController.city}" required="true">
-                                               <f:validator for="city" validatorId="NameValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="country" value="#{msg.PERSONAL_DATA_COUNTRY_CODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu styleClass="select" id="country" value="#{contactController.country}" converter="CountryConverter">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryCode} (#{msg[c.countryI18nkey]})" />
-                                       </h:selectOneMenu>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel value="#{msg.PERSONAL_DATA_PHONE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu styleClass="select" id="countryPhoneCode" value="#{contactController.phoneCountry}" converter="CountryConverter">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText styleClass="input" id="phoneAreaCode" size="5" maxlength="10" value="#{contactController.phoneAreaCode}">
-                                               <f:validator for="phoneAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText styleClass="input" id="phoneNumber" size="10" maxlength="20" value="#{contactController.phoneNumber}">
-                                               <f:validator for="phoneNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="faxNumber" value="#{msg.PERSONAL_DATA_FAX_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <h:selectOneMenu styleClass="select" id="faxCountryCode" value="#{contactController.faxCountry}" converter="CountryConverter">
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                               <f:selectItems value="#{countryController.allCountries()}" var="c" itemValue="#{c}" itemLabel="#{c.countryAbroadDialPrefix}#{c.countryPhoneCode}" />
-                                       </h:selectOneMenu>
-
-                                       <h:inputText styleClass="input" id="faxAreaCode" size="5" maxlength="10" value="#{contactController.faxAreaCode}">
-                                               <f:validator for="faxAreaCode" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-
-                                       <h:inputText styleClass="input" id="faxNumber" size="10" maxlength="20" value="#{contactController.faxNumber}">
-                                               <f:validator for="faxNumber" validatorId="PhoneNumberValidator" />
-                                       </h:inputText>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="cellphoneNumber" value="#{msg.PERSONAL_DATA_CELLPHONE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/mobile_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{contactController}" />
-                                       </ui:include>
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-               </fieldset>
-       </div>
-
-       <div class="para">
-               <fieldset id="user_profile">
-                       <legend title="#{msg.USER_PROFILE_LEGEND_TITLE}">#{msg.USER_PROFILE_LEGEND}</legend>
-
-                       <div class="table_row">
-                               <div class="table_left">
-                                       <h:outputLabel for="profileMode" value="#{msg.USER_PROFILE_MODE}" />
-                               </div>
-
-                               <div class="table_right">
-                                       <ui:include src="/WEB-INF/templates/generic/profile_mode_selection_box.tpl" />
-                               </div>
-
-                               <div class="clear"></div>
-                       </div>
-
-                       <div class="table_row">
-                               <div class="para notice">
-                                       <ul>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_INVISIBLE}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_MEMBERS}</li>
-                                               <li>#{msg.SELECTION_NOTICE_USER_PROFILE_MODE_PUBLIC}</li>
-                                       </ul>
-                               </div>
-                       </div>
-               </fieldset>
-       </div>
-</ui:composition>
index 10114a5dc1524e0e63e72f07da59e022ba922026..c95a7639d70077ef6834b5382f5cbd0a0fe24d1d 100644 (file)
@@ -12,7 +12,7 @@
                                #{msg.GUEST_REGISTRATION_TITLE}
                        </div>
 
-                       <ui:include src="/WEB-INF/templates/generic/form_personal_data.tpl" />
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
 
                        <div class="para">
                                <fieldset id="login_data">
@@ -32,7 +32,7 @@
 
                                        <div class="table_row">
                                                <div class="table_left">
-                                                       <h:outputLabel for="emailAddress1" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL1}" />
+                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL1}" />
                                                </div>
 
                                                <div class="table_right">
@@ -44,7 +44,7 @@
 
                                        <div class="table_row">
                                                <div class="table_left">
-                                                       <h:outputLabel for="emailAddress2" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL2}" />
+                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL2}" />
                                                </div>
 
                                                <div class="table_right">
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
new file mode 100644 (file)
index 0000000..55c2ebd
--- /dev/null
@@ -0,0 +1,97 @@
+<?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_form">
+               <div class="table">
+                       <div class="table_header">
+                               #{msg.GUEST_REGISTRATION_TITLE}
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                       <div class="para">
+                               <fieldset id="login_data">
+                                       <legend title="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND_TITLE}">#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}</legend>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="userName" size="20" maxlength="255" value="#{userController.userName}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddress" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{contactController.emailAddress}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="emailAddressRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL_REPEAT}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{contactController.emailAddressRepeat}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="para"></div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userController.userPassword}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="table_row">
+                                               <div class="table_left">
+                                                       <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" />
+                                               </div>
+
+                                               <div class="table_right">
+                                                       <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userController.userPasswordRepeat}" required="true" />
+                                               </div>
+
+                                               <div class="clear"></div>
+                                       </div>
+
+                                       <div class="para notice">
+                                               #{msg.GUEST_REGISTRATION_USER_NAME_NOTICE}
+                                       </div>
+                               </fieldset>
+                       </div>
+
+                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                       <div class="table_footer">
+                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_FINISH_REGISTRATION}" action="#{registerController.doRegister()}" />
+                       </div>
+               </div>
+       </h:form>
+</ui:composition>
index 756c2f44869d01fc04590f299c5ca488b87c4bf2..3cfd020c72ad60c1543b38d7c0f3fdf83e56b7db 100644 (file)
@@ -3,12 +3,12 @@
 <html
        lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
        xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-         xmlns:h="http://xmlns.jcp.org/jsf/html"
-         xmlns:f="http://xmlns.jcp.org/jsf/core"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
-       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
+       <ui:composition template="/WEB-INF/templates/login/login_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS}</ui:define>
 
                <ui:define name="content_header">
@@ -33,7 +33,7 @@
                                                                        </div>
 
                                                                        <div class="table_right">
-                                                                               #{contactController.emailAddress}
+                                                                               #{userController.emailAddress}
                                                                        </div>
 
                                                                        <div class="clear"></div>
@@ -45,7 +45,7 @@
                                                                        </div>
 
                                                                        <div class="table_right">
-                                                                               <h:inputText styleClass="input" id="emailAddress" size="20" maxlength="255" value="#{emailChangeController.emailAddress}" required="true" />
+                                                                               <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{emailChangeController.emailAddress}" required="true" />
                                                                        </div>
 
                                                                        <div class="clear"></div>
@@ -57,7 +57,7 @@
                                                                        </div>
 
                                                                        <div class="table_right">
-                                                                               <h:inputText styleClass="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{emailChangeController.emailAddressRepeat}" required="true" />
+                                                                               <h:inputText class="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{emailChangeController.emailAddressRepeat}" required="true" />
                                                                        </div>
 
                                                                        <div class="clear"></div>
                                                        </fieldset>
                                                </div>
 
-                                               <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
+                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
 
                                                <div class="table_footer">
-                                                       <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" />
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" />
                                                </div>
                                        </h:form>
                                </div>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
-                               <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>