]> git.mxchange.org Git - jjobs-war.git/commitdiff
Splitted edit_user_data into 3 new sub actions + added logged-in check:
authorRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 19:48:36 +0000 (20:48 +0100)
committerRoland Haeder <roland@mxchange.org>
Fri, 4 Mar 2016 19:48:36 +0000 (20:48 +0100)
- new template user_not_logged_in.tpl added which shows a message if the user is not logged-in and tries to access a login-only page
- added login_change_email_address.xhtml for changing email address
- added login_change_password.xhtml for changing password
- added login_change_personal_data.xhtml for changing personal data
- login_edit_address.xhtml is now no longer needed

18 files changed:
nbproject/faces-config.NavData
src/java/org/mxchange/jjobs/beans/login/UserLoginWebSessionBean.java
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/glassfish-web.xml
web/WEB-INF/templates.dist/login_page.xhtml
web/WEB-INF/templates/generic/user_not_logged_in.tpl [new file with mode: 0644]
web/WEB-INF/templates/login/login_base.tpl
web/WEB-INF/templates/login/login_menu.tpl
web/login/login_add_addressbook.xhtml
web/login/login_change_email_address.xhtml [new file with mode: 0644]
web/login/login_change_password.xhtml [new file with mode: 0644]
web/login/login_change_personal_data.xhtml [new file with mode: 0644]
web/login/login_edit_address.xhtml [deleted file]
web/login/login_edit_user_data.xhtml
web/login/login_index.xhtml
web/login/login_own_addressbooks.xhtml

index 50a0e4bd0098530a83e13713f8360906bb9a16b1..14f4031113f5e5e0e47671d363914ca8515ec4a4 100644 (file)
@@ -2,29 +2,33 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="login/login_edit_address.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="privacy.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="user/resend_link.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="login/login_add_addressbook.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="login/login_own_addressbooks.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="terms.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="user/user_list.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="bye.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="index.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="user/register_done.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="user/show_addressbook.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="imprint.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="*" x="400" y="300" zoom="true"/>
-        <Node id="user/login_error.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="user/show_addressbook_entries.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/admin_index.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="user/lost_passwd.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="user/login.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_edit_address.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="privacy.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="user/register.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="login/login_all_applications.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="user/resend_link.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="login/login_add_addressbook.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="login/login_own_addressbooks.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="terms.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="user/user_list.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="bye.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="index.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="user/register_done.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="imprint.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="user/show_addressbook.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="*" x="150" y="900" zoom="true"/>
+        <Node id="user/login_error.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="user/show_addressbook_entries.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="admin/admin_index.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="login/login_change_email_address.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/lost_passwd.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="user/login.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="400" y="300" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index b569fbae800fa5ceebf6cba78af51b466beb5ce4..f81c1f8a81befd0b90681e8bf12bdad5782ee2b5 100644 (file)
@@ -173,13 +173,13 @@ public class UserLoginWebSessionBean implements UserLoginWebSessionController {
        @Override
        public boolean isUserLoggedIn () {
                // Trace message
-               // NOISY: System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType()));
+               // NOISY-DEBUG System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType()));
 
                // Compare instance
                this.userLoggedIn = ((this.getLoggedInUser() instanceof User) && (Objects.equals(this.getLoggedInUser().getUserAccountStatus(), UserAccountStatus.CONFIRMED)));
 
                // Trace message
-               // NOISY: System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
+               // NOISY-DEBUG System.out.println(MessageFormat.format("UserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
 
                // Return it
                return this.userLoggedIn;
index 228d1aae462d55820d6f4162f8b6cec350486fd9..6f92a5d91a44b8a828ad2c3a716a6a39b348857f 100644 (file)
@@ -139,13 +139,9 @@ PAGE_TITLE_USER_LIST=Benutzerliste
 CONTENT_TITLE_USER_LIST=Alle angemeldeten Benutzer:
 PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern mir freigegeben Adressb\u00fccher
 CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Von anderen Benutzern freigegebene Adressb\u00fccher auflisten:
-LINK_LOGIN_EDIT_ADDRESS=Kontaktdaten \u00e4ndern
-LINK_LOGIN_EDIT_ADDRESS_TITLE=\u00c4ndern Sie hier Ihre eigenen Kontaktdaten.
 LINK_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern
 LINK_LOGIN_EDIT_USER_DATA_TITLE=\u00c4ndern Sie hier Ihre eigenen Benutzerdaten.
 MENU_EDIT_PROFILE_TITLE=Daten \u00e4ndern
-PAGE_TITLE_LOGIN_EDIT_ADDRESS=Meine Kontaktdaten \u00e4ndern
-CONTENT_TITLE_LOGIN_EDIT_ADDRESS=\u00c4ndern Sie Ihre Adressdaten:
 PAGE_TITLE_LOGIN_EDIT_USER_DATA=Benutzerdaten \u00e4ndern
 CONTENT_TITLE_LOGIN_EDIT_USER_DATA=\u00c4ndern Sie Ihre Benutzerdaten:
 PRIVACY_STATEMENTS=Datenschutzbestimmungen
@@ -219,8 +215,7 @@ ADDRESSBOOK_STATUS=Status:
 PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK=\u00d6ffentlicher Teil des Adressbuchs anzeigen
 USER_PROFILE_NOT_PUBLICLY_VISIBLE=Das Benutzerprofil ist privat.
 PAGE_TITLE_LOGIN_USER_PROFILE=Benutzerprofil ansehen
-#TODO: Fix German umlaut!
-PUBLIC_USER_PROFILE=Oeffentliches Benutzerprofil
+PUBLIC_USER_PROFILE=\u00d6ffentliches Benutzerprofil
 USER_PROFILE_MODE_INVISIBLE=Nicht sichtbar
 USER_PROFILE_MODE_MEMBERS=Nur von Mitgliedern einsehbar
 #TODO: Please fix German umlaut!
@@ -238,3 +233,17 @@ ERROR_USER_INSTANCE_NOT_SET=Fehler: Benutzer-Instanz nicht gesetzt.
 LOGIN_ADDRESSBOOK_NOT_SET=Adressbuch-Instanz nicht gesetzt.
 LINK_GUEST_LOGIN_LOST_PASSWORD=Passwort vergessen?
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Passwort wiederherstellen
+#TODO: Please fix German umlaut!
+TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=Sie muessen angemeldet sein
+#TODO: Please fix German umlaut!
+USER_IS_NOT_LOGGED_IN_FULL=Damit diese Funktion nutzen koennen, muessen Sie sich anmelden und in Ihren Account eingeloggt sein.
+#TODO: Please fix German umlaut!
+LOGIN_EDIT_USER_DATA_TITLE=Was moechten Sie aendern?
+#TODO: Please fix German umlaut!
+LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=Sie koennen hier Ihre persoenlichen Daten, Ihre Email-Adresse und Ihr Passwort zum Einloggen aendern.
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_PERSONAL_DATA=Persoenliche Daten, wie Anschrift usw. aendern
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Ihre Email-Adresse aendern
+#TODO: Please fix German umlaut!
+LINK_LOGIN_CHANGE_PASSWORD=Ihr Passwort aendern
index b6599648b0a947812cd6a321bcda6af4806a5d3b..65f59c0b8a1609e3c1653b07f0257a35aec88229 100644 (file)
@@ -138,13 +138,9 @@ PAGE_TITLE_USER_LIST=User list
 CONTENT_TITLE_USER_LIST=All registered users:
 PAGE_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Other user's addressbooks shared with me
 CONTENT_TITLE_LOGIN_OTHER_ADDRESSBOOKS=Manage other's shared address books
-LINK_LOGIN_EDIT_ADDRESS=Personal data
-LINK_LOGIN_EDIT_ADDRESS_TITLE=Change your own address data here.
 LINK_LOGIN_EDIT_USER_DATA=Profile data
 LINK_LOGIN_EDIT_USER_DATA_TITLE=Change your own user account data here.
 MENU_EDIT_PROFILE_TITLE=Edit data
-PAGE_TITLE_LOGIN_EDIT_ADDRESS=Change my address data
-CONTENT_TITLE_LOGIN_EDIT_ADDRESS=Change your address data:
 PAGE_TITLE_LOGIN_EDIT_USER_DATA=Change user data
 CONTENT_TITLE_LOGIN_EDIT_USER_DATA=Change your user data:
 PRIVACY_STATEMENTS=privacy statements
@@ -232,3 +228,10 @@ ERROR_USER_INSTANCE_NOT_SET=Error: User instance not set.
 LOGIN_ADDRESSBOOK_NOT_SET=Address book instance not set.
 LINK_GUEST_LOGIN_LOST_PASSWORD=Lost your password?
 LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD=Restore your password
+TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=You need to be logged-in
+USER_IS_NOT_LOGGED_IN_FULL=To use this feature you need to register and be logged-in into your account.
+LOGIN_EDIT_USER_DATA_TITLE=What do you want to change?
+LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE=You can change your personal data, your email address and your password for login here.
+LINK_LOGIN_CHANGE_PERSONAL_DATA=Change personal data such as your address.
+LINK_LOGIN_CHANGE_EMAIL_ADDRESS=Change your email address
+LINK_LOGIN_CHANGE_PASSWORD=Change your password
index 5125f2cd1641d2b6d999d9c2b869f0d3336328da..83579c0172e34f5f75c2d828c6d205203cbac03d 100644 (file)
                        <from-outcome>admin_logout</from-outcome>
                        <to-view-id>/admin/admin_logout.xhtml</to-view-id>
                </navigation-case>
-               <navigation-case>
-                       <from-outcome>login_edit_address</from-outcome>
-                       <to-view-id>/login/login_edit_address.xhtml</to-view-id>
-               </navigation-case>
                <navigation-case>
                        <from-outcome>login_edit_user_data</from-outcome>
                        <to-view-id>/login/login_edit_user_data.xhtml</to-view-id>
                        <to-view-id>/user/show_addressbook_entries.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+    <navigation-rule>
+        <from-view-id>/login/login_edit_user_data.xhtml</from-view-id>
+        <navigation-case>
+            <from-outcome>login_change_email_address</from-outcome>
+            <to-view-id>/login/login_change_email_address.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>login_change_password</from-outcome>
+            <to-view-id>/login/login_change_password.xhtml</to-view-id>
+        </navigation-case>
+        <navigation-case>
+            <from-outcome>login_change_personal_data</from-outcome>
+            <to-view-id>/login/login_change_personal_data.xhtml</to-view-id>
+        </navigation-case>
+    </navigation-rule>
 </faces-config>
index b70617b4789ffb46b59220a95c2e94b78eb295cf..15d7a0a50778d14265636967e7bd8542d06511ee 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
 <glassfish-web-app error-url="">
-       <context-root>/addressbook-war</context-root>
+       <context-root>/jjobs-war</context-root>
        <class-loader delegate="true"/>
        <jsp-config>
                <property name="keepgenerated" value="true">
index b93f606edd421fddab1ef456c316a0125818acd2..b021f0a5f6eaf4e6af81f7ecc7aaa98e11e6b0b5 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
diff --git a/web/WEB-INF/templates/generic/user_not_logged_in.tpl b/web/WEB-INF/templates/generic/user_not_logged_in.tpl
new file mode 100644 (file)
index 0000000..300eb24
--- /dev/null
@@ -0,0 +1,17 @@
+<?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://java.sun.com/jsf/facelets">
+
+       <div class="table">
+               <div class="table_header">
+                       #{msg.TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN}
+               </div>
+
+               <div class="para errors">
+                       <h:outputText value="#{msg.USER_IS_NOT_LOGGED_IN_FULL}" />
+               </div>
+       </div>
+</ui:composition>
index abd205b7778faaf725475f1a6fe4b3c29c1d6fd0..d3e0f5fc89b58718fe873d8a32411f7f8a35112f 100644 (file)
@@ -1,14 +1,19 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
-       rendered="#{loginController.isUserLoggedIn()}"
        template="/WEB-INF/templates/base.tpl"
        xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://java.sun.com/jsf/facelets">
+       xmlns:ui="http://java.sun.com/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html">
 
        <ui:define name="title">#{msg.PAGE_TITLE_LOGIN_AREA} - <ui:insert name="login_title" class="login_title" /></ui:define>
 
        <ui:define name="menu">
-               <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" />
+               <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                       <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" />
+               </ui:fragment>
+               <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                       <h:outputText class="errors" value="#{msg.USER_NOT_LOGGED_IN}" />
+               </ui:fragment>
        </ui:define>
 
        <ui:define name="footer">
index 8421aee98977721af3286015e2cf6340f21f060a..436c556658f79b8851678acc91d0ca850bf2d1b3 100644 (file)
@@ -28,9 +28,6 @@
                                <li>
                                        <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="login_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
                                </li>
-                               <li>
-                                       <h:link title="#{msg.LINK_LOGIN_EDIT_ADDRESS_TITLE}" outcome="login_edit_address" value="#{msg.LINK_LOGIN_EDIT_ADDRESS}" />
-                               </li>
                        </ul>
 
                        <div class="menu_header">
index 30f86dafb6bc92e7cd68bc314563499698561365..d186b4adcad5a8583c146311d74ccd16e934ad69 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <h:form id="add_addressbook" acceptcharset="utf-8">
-                               <div class="table">
-                                       <div class="table_header">
-                                               #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE}
-                                       </div>
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <h:form id="add_addressbook" acceptcharset="utf-8">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE}
+                                               </div>
 
-                                       <div class="table_row">
-                                               <div class="table_left">
-                                                       <h:outputLabel for="addressbookName" value="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME}"/>
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="addressbookName" value="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME}"/>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText class="input" id="addressbookName" value="#{addressbookController.addressbookName}" maxlength="50" size="20" title="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE}" required="true" requiredMessage="#{msg.LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE}">
+                                                                       <f:validator for="addressbookName" validatorId="AddressbookNameValidator" />
+                                                               </h:inputText>
+                                                       </div>
                                                </div>
 
-                                               <div class="table_right">
-                                                       <h:inputText class="input" id="addressbookName" value="#{addressbookController.addressbookName}" maxlength="50" size="20" title="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE}" required="true" requiredMessage="#{msg.LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE}">
-                                                               <f:validator for="addressbookName" validatorId="AddressbookNameValidator" />
-                                                       </h:inputText>
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_LOGIN_ADD_ADDRESSBOOK}" action="#{addressbookController.addAddressbook()}" />
                                                </div>
                                        </div>
+                               </h:form>
+                       </ui:fragment>
 
-                                       <div class="table_footer">
-                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_LOGIN_ADD_ADDRESSBOOK}" action="#{addressbookController.addAddressbook()}" />
-                                       </div>
-                               </div>
-                       </h:form>
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
diff --git a/web/login/login_change_email_address.xhtml b/web/login/login_change_email_address.xhtml
new file mode 100644 (file)
index 0000000..a5db8b0
--- /dev/null
@@ -0,0 +1,85 @@
+<?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 xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/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/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_USER_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_EDIT_USER_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}
+                                               </div>
+
+                                               <div class="para">
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_EMAIL_LEGEND}</legend>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddress1" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL1}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddress1" size="20" maxlength="255" value="#{userController.emailAddress}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddress2" value="#{msg.GUEST_REGISTRATION_ENTER_EMAIL2}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddress2" size="20" maxlength="255" value="#{userController.emailAddressRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="para"></div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{loginController.changeEmailAddress()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_password.xhtml b/web/login/login_change_password.xhtml
new file mode 100644 (file)
index 0000000..6b422d9
--- /dev/null
@@ -0,0 +1,84 @@
+<?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 xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/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/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_PASSWORD}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_PASSWORD}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_PERSONAL_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_PASSWORD_TITLE}
+                                               </div>
+
+                                               <div class="para">
+                                                       <fieldset id="login_data">
+                                                               <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}</legend>
+
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password1" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD1}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{loginController.userPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password2" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD2}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{loginController.userPasswordRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{loginController.changePassword()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_personal_data.xhtml b/web/login/login_change_personal_data.xhtml
new file mode 100644 (file)
index 0000000..7c4db3d
--- /dev/null
@@ -0,0 +1,59 @@
+<?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 xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://java.sun.com/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/login_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_USER_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_EDIT_USER_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_change_personal_form">
+                                               <div class="table_header2">
+                                                       #{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}
+                                               </div>
+
+                                               <ui:include src="/WEB-INF/templates/generic/form_personal_data.tpl" />
+
+                                               <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                                               <div class="para"></div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="password" value="#{msg.LOGIN_ENTER_PASSWORD_CONFIRM}" />
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputSecret class="input" id="password" size="10" maxlength="255" value="#{loginController.currentPassword}" required="true" />
+                                                       </div>
+
+                                                       <div class="clear"></div>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{loginController.changePersonalData()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_edit_address.xhtml b/web/login/login_edit_address.xhtml
deleted file mode 100644 (file)
index 933c603..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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 xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://java.sun.com/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/login_base.tpl">
-               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_EDIT_ADDRESS}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_LOGIN_EDIT_ADDRESS}
-               </ui:define>
-
-               <ui:define name="content">
-                       Here goes your content.
-               </ui:define>
-       </ui:composition>
-</html>
index 638011b8e63122e547474f61da305be43dc29fc4..5208fa7e7623c0e1dfe65269a04351a971254262 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <div class="para notice">
+                                               <h:outputText value="#{msg.LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ul>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 774ab6268ef1b7f6058b73a3a4bb17f9a8aaf5e9..baa04c5a4b08f98e4480c32a8d3446528409ddcb 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 1ce2531566afc295c623b8b491818dd1c7b9f954..1dca7e35d713dfca66ffa13d5094a5931ae90e89 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table">
-                               <div class="table_header">
-                                       #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
-                               </div>
+                       <h:outputText rendered="#{loginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
+                                       </div>
 
-                               <div class="para">
-                                       <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks()}" styleClass="table" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
-
-                                                       <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
-                                                               <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
-                                                               <h:outputText id="addressbookName" value="#{addressbook.addressbookName}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
-                                                       </h:link>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
-
-                                                       <h:link outcome="show_addressbook_entries" title="#{msg.LINK_SHOW_ADDRESSBOOK_ENTRIES_TITLE}">
-                                                               <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
-                                                               <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_TOTAL_ENTRIES_TITLE}" />
-                                                       </h:link>
-                                               </h:column>
-
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
-
-                                                       <h:outputFormat id="addressbookCreated" value="#{addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
-                                                               <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
-                                                       </h:outputFormat>
-                                               </h:column>
-                                       </h:dataTable>
-                               </div>
+                                       <div class="para">
+                                               <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks()}" styleClass="table" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
+
+                                                               <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookName" value="#{addressbook.addressbookName}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
 
-                               <div class="table_footer">
-                                       <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
-                                       <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                                                               <h:link outcome="show_addressbook_entries" title="#{msg.LINK_SHOW_ADDRESSBOOK_ENTRIES_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_TOTAL_ENTRIES_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
+
+                                                               <h:outputFormat id="addressbookCreated" value="#{addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
+                                                                       <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
+                                                               </h:outputFormat>
+                                                       </h:column>
+                                               </h:dataTable>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
+                                               <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                                       </div>
                                </div>
-                       </div>
+                       </h:outputText>
+
+                       <h:outputText rendered="#{not loginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" class="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </h:outputText>
                </ui:define>
        </ui:composition>
 </html>