]> git.mxchange.org Git - jjobs-war.git/commitdiff
Continued a bit: (please cherry-pick)
authorRoland Häder <roland@mxchange.org>
Tue, 2 Aug 2016 16:05:10 +0000 (18:05 +0200)
committerRoland Haeder <roland@mxchange.org>
Sun, 7 Aug 2016 10:14:23 +0000 (12:14 +0200)
- all form ids now start with form_, fixed (maybe?) all occurrences

Signed-off-by: Roland Häder <roland@mxchange.org>
21 files changed:
src/java/org/mxchange/jjobs/beans/contact/JobsContactWebSessionBean.java
src/java/org/mxchange/jjobs/beans/email_address/JobsEmailChangeWebSessionBean.java
src/java/org/mxchange/jjobs/beans/login/JobsUserLoginWebSessionBean.java
src/java/org/mxchange/jjobs/beans/mobileprovider/JobsAdminMobileProviderWebRequestBean.java
web/WEB-INF/templates/admin/cellphone/admin_form_contact_cellphone.tpl
web/WEB-INF/templates/generic/locale_selection_box.tpl
web/WEB-INF/templates/guest/user/guest_login_form.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
web/admin/admin_logout.xhtml [new file with mode: 0644]
web/admin/contact/admin_contact_delete.xhtml
web/admin/contact/admin_contact_edit.xhtml
web/admin/contact/admin_contact_list.xhtml
web/admin/mobile_provider/admin_mobile_provider_list.xhtml
web/admin/user/admin_user_unlock.xhtml
web/guest/user/lost_passwd.xhtml
web/user/login_change_email_address.xhtml
web/user/login_change_password.xhtml
web/user/login_change_personal_data.xhtml
web/user/login_logout.xhtml [new file with mode: 0644]

index 2643123b99a3ad4830aa9b3deb49f84e17bb39b5..840af12ea5e040050cd503f5ed5c641af4bc6e04 100644 (file)
@@ -542,7 +542,7 @@ public class JobsContactWebSessionBean extends BaseJobsController implements Job
                        throw new FaceletException("Not all required fields are set."); //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("login_change_personal_form:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_change_personal:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
                        return ""; //NOI18N
                }
 
index acb23c4eced462037aeb193f62cc773c4f51abb5..227f39bfe80e25db01215ecd46527cf5fe656d04 100644 (file)
@@ -110,7 +110,7 @@ public class JobsEmailChangeWebSessionBean extends BaseJobsController implements
                        throw new FaceletException("Email address 1/2 are mismatching."); //NOI18N
                } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       this.showFacesMessage("login_change_email_address_form:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
+                       this.showFacesMessage("form_login_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.getLoggedInUser())); //NOI18N
                        return ""; //NOI18N
                }
 
index bad611038c9c81ce4bb819a313a36ed2bdb2282d..e2fcec24f81b82703b96ba7c5e115de5b13f6857 100644 (file)
@@ -144,9 +144,14 @@ public class JobsUserLoginWebSessionBean extends BaseJobsController implements J
 
                        // All fine
                        return "login"; //NOI18N
-               } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException | UserPasswordMismatchException ex) {
-                       // Throw again
-                       throw new FaceletException(ex);
+               } catch (final UserNotFoundException | UserStatusLockedException | UserStatusUnconfirmedException ex) {
+                       // Show JSF message
+                       this.showFacesMessage("form_user_login:userName", ex); //NOI18N
+                       return ""; //NOI18N
+               } catch (final UserPasswordMismatchException ex) {
+                       // Show JSF message
+                       this.showFacesMessage("form_user_login:userPassword", ex); //NOI18N
+                       return ""; //NOI18N
                }
        }
 
index f4486b21520f69dfac23f5c14f7bc523649908f8..c8a2ba85eb85385cd9a8f054ccb24d6ea76fdbf4 100644 (file)
@@ -114,7 +114,7 @@ public class JobsAdminMobileProviderWebRequestBean extends BaseJobsController im
                // Is the provider already created?
                if (this.isMobileProviderCreated(mobileProvider)) {
                        // Then throw exception
-                       this.showFacesMessage("add_mobile_provider_form:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider)); //NOI18N
+                       this.showFacesMessage("form_add_mobile_provider:providerDialPrefix", new MobileProviderAlreadyAddedException(mobileProvider)); //NOI18N
                        return ""; //NOI18N
                }
 
index 25dd7b39f01c3701425ea50f14ffcf77a7eb5f13..914e968340c751a6946744ac211cf3511e5d6d2f 100644 (file)
@@ -5,6 +5,6 @@
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:form id="add_contact_cellphone">
+       <h:form id="form_add_contact_cellphone">
        </h:form>
 </ui:composition>
index f35299de2aeb3d74d93591887a65c2cf4923e9ab..1da2f1ab7a60a3bfada6f04e7d86a82a08860081 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:form id="locale_selection">
+       <h:form id="form_locale_selection">
                <h:selectOneMenu id="language_selection" value="#{localizationController.language}" onchange="submit()">
                        <f:selectItem itemLabel="#{msg.SELECT_LANGUAGE}" noSelectionOption="true" />
                        <f:selectItems value="#{localizationController.selectableLocalizations}" var="l" itemValue="#{l}" itemLabel="#{msg[l.toString().toUpperCase()]}" />
index 516b50259152c1dc6567514323ca7e199be12849..ee814a923ad4d0636eec57850aba62c4213bbfa9 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
        <div id="user_login_content">
-               <h:form id="login_form">
+               <h:form id="form_user_login">
                        <div class="table">
                                <div class="table_header">
                                        #{msg.GUEST_ENTER_USER_LOGIN_DATA_TITLE}
index 465fc01f785cdbcb0a6f50fce396303af1ffc52d..022de70fc737743f48efcd890ecb4869d93b09aa 100644 (file)
@@ -6,7 +6,7 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
 
-       <h:form id="register_page1_form">
+       <h:form id="form_register_page1">
                <div class="table">
                        <div class="table_header">
                                #{msg.GUEST_REGISTRATION_PAGE1_TITLE}
index 1e7e0a89c5975bb5e890bc45a188746c6d2c9c47..74f3291ebceb1bb1fc750db8e09bc515eccc2e90 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:form id="register_page2_form">
+       <h:form id="form_register_page2">
                <div class="table">
                        <div class="table_header">
                                #{msg.GUEST_REGISTRATION_PAGE2_TITLE}
index d26fd581dcb9a1f1b79c28419c4f79ad02a5ae71..d64728e632c983ce3309f9b52b7def554410b681 100644 (file)
@@ -5,7 +5,7 @@
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
-       <h:form id="register_single_form">
+       <h:form id="form_register_single">
                <div class="table">
                        <div class="table_header">
                                <h:outputText value="#{msg.GUEST_REGISTRATION_TITLE}" />
diff --git a/web/admin/admin_logout.xhtml b/web/admin/admin_logout.xhtml
new file mode 100644 (file)
index 0000000..34ec868
--- /dev/null
@@ -0,0 +1,36 @@
+<!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"
+       >
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LOGOUT}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_ADMIN_LOGOUT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_admin_logout">
+                               <div class="table">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.ADMIN_LOGOUT_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.ADMIN_LOGOUT_NOTICE}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton styleClass="submit" type="submit" action="#{userLoginController.doAdminLogout()}" value="#{msg.BUTTON_USER_LOGOUT}" />
+                                       </div>
+                               </div>
+                       </h:form>
+               </ui:define>
+       </ui:composition>
+</html>
index e203fd2a882aa01adda7a5deb4ec36785a479916..0e949e8a5391d46f957f2d49f5d48b50d8972d18 100644 (file)
@@ -22,7 +22,7 @@
                <ui:define name="content">
                        <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
+                       <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_TITLE}">
index bbc2b89d5898939d004d39b420f13bedafb2e9b9..642dbc8fec33a137868e972057a72ad199fda139 100644 (file)
@@ -22,7 +22,7 @@
                <ui:define name="content">
                        <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" />
 
-                       <h:form id="admin_edit_user" rendered="#{not empty beanHelper.contact}">
+                       <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}">
                                <div class="table">
                                        <div class="table_header">
                                                <h:outputFormat value="#{msg.ADMIN_EDIT_CONTACT_TITLE}">
index 40f1ff996a7f862ce32651c00c26348b954a4b7a..b01ffd2ebaf115b3dbcba2419b41ad72b97806ed 100644 (file)
@@ -70,7 +70,7 @@
                        </h:dataTable>
 
                        <div class="table_medium">
-                               <h:form id="admin_add_contact">
+                               <h:form id="form_admin_add_contact">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" />
                                        </div>
index d14802947373b9d28080f61fecabc0545e4d08b1..ba05200373e17e54599b871adb7cbe729ca51ba0 100644 (file)
@@ -61,7 +61,7 @@
                                </h:column>
                        </h:dataTable>
 
-                       <h:form id="add_mobile_provider_form">
+                       <h:form id="form_add_mobile_provider">
                                <div class="table_medium">
                                        <div class="table_header">
                                                <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" />
index 7124aca2126c50b8e92036af6131cf0401dbf100..2e00380a255a0163b15e2280bcabd908c1c39611 100644 (file)
@@ -22,7 +22,9 @@
                <ui:define name="content">
                        <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" />
 
-                       Here goes your content.
+                       <h:form id="form_admin_user_unlock">
+                               
+                       </h:form>
                </ui:define>
        </ui:composition>
 </html>
index a62806856bc0d6d17363c9081e561ca00533e6b5..df867ca2249e01ad504f27e43a11f94b86238285 100644 (file)
@@ -17,7 +17,7 @@
                <ui:define name="content">
                        <ui:fragment rendered="#{userController.isUserNameRequired()}">
                                <div class="para" id="user_lost_password_content">
-                                       <h:form id="lost_password_form">
+                                       <h:form id="form_lost_password">
                                                <div class="table">
                                                        <div class="table_header">
                                                                <h:outputText value="#{msg.GUEST_LOST_PASSWORD_TITLE}" />
index d42ad5a4a962cc6f8a80b9791512a68a707aa746..f329ea456e25c7147a37c948a76c182da53d12e5 100644 (file)
@@ -21,7 +21,7 @@
                                                <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
                                        </div>
 
-                                       <h:form id="login_change_email_address_form">
+                                       <h:form id="form_login_change_email_address">
                                                <div class="para">
                                                        <fieldset id="change_email">
                                                                <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
index 1c8c6021d6a2bfe1c0b8eb29a10b19c276281e2c..ae17f9f97367137c7f3358f9d999fadb9465f364 100644 (file)
@@ -2,10 +2,10 @@
 <html
        lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
        xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-         xmlns:h="http://xmlns.jcp.org/jsf/html"
-         xmlns:f="http://xmlns.jcp.org/jsf/core"
-         >
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       >
 
        <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_CHANGE_PASSWORD}</ui:define>
index 64a62680307985a5c1df304fb2d889560b4681a8..6b0f256947353a0736b3379d6f2b1e7793b5e1fa 100644 (file)
@@ -21,7 +21,7 @@
                                                <h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" />
                                        </div>
 
-                                       <h:form id="login_change_personal_form">
+                                       <h:form id="form_login_change_personal">
                                                <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
 
                                                <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
diff --git a/web/user/login_logout.xhtml b/web/user/login_logout.xhtml
new file mode 100644 (file)
index 0000000..3820f96
--- /dev/null
@@ -0,0 +1,40 @@
+<!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"
+       >
+
+       <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_LOGOUT}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_USER_LOGOUT}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:form id="form_user_logout" rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.LOGIN_USER_LOGOUT_TITLE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText value="#{msg.LOGIN_USER_LOGOUT_NOTICE}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton styleClass="submit" type="submit" action="#{userLoginController.doUserLogout()}" value="#{msg.BUTTON_USER_LOGOUT}" />
+                                       </div>
+                               </div>
+                       </h:form>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>