]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 14:39:14 +0000 (16:39 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 25 Aug 2016 18:36:35 +0000 (20:36 +0200)
- added new page that admins can send out a new confirmation link to users
- added navigation rule for new page
- added missing i18n strings
- using ui:fragment is now no longer required (it hid the <li> tag if unconfirmed)
- fixed i18n usage

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/templates/admin/user/admin_user_links.tpl
web/admin/user/admin_user_resend_confirmation_link.xhtml [new file with mode: 0644]
web/admin/user/admin_user_unlock.xhtml

index 5e660eb04bb23bd2d1ea595f44b982ef04e7f902..1feae44ce31b29fc60255c4767a91a036da141dd 100644 (file)
@@ -726,3 +726,12 @@ BUTTON_ADMIN_DELETE_LAND_LINE_NUMBER=Festnetznummer l\u00f6schen
 ADMIN_CONTACT_LIST_EMPTY=Keine Kontaktdaten in Datenbank gefunden.
 ADMIN_USER_LIST_EMPTY=Keine Benutzerdaten in Datenbank gefunden.
 ADMIN_PERSONAL_DATA_COMMENT=Kommentar: (optional)
+ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink zusenden
+ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE=Sendet einen neuen Best\u00e4tigungslink an die im Account hinterlegte Email-Adresse.
+ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_UNLOCKED=Fehler: Kann keinen neuen Best\u00e4tigungslink aussenden, Benutzeraccount ist bereits best\u00e4tigt.
+ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_LOCKED=Fehler: Kann keinen neuen Best\u00e4tigungslink aussenden, Benutzeraccount ist gesperrt.
+BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT=Neuen Best\u00e4tigungslink aussenden
+ADMIN_RESEND_USER_CONFIRMATION_LINK_TITLE=M\u00f6chten Sie dem Benutzer {0} (Id-Nummer {1}) einen neuen Best\u00e4tigungslink zusenden?
+ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE=Durch das Zuschicken eines neuen Best\u00e4tigungslinkes wird der alte ung\u00fcltig und nur noch der neue Link kann verwendet werden.
+PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink versenden
+CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Neuen Best\u00e4tigungslink versenden:
index 940e71680f518987f406606cd5be195af551d3f0..188518035338c530edb01a4c7f6d41bffc7e1b07 100644 (file)
@@ -726,3 +726,13 @@ BUTTON_ADMIN_DELETE_LAND_LINE_NUMBER=Delete land-line number
 ADMIN_CONTACT_LIST_EMPTY=No contact data found in database.
 ADMIN_USER_LIST_EMPTY=No user data found in database.
 ADMIN_PERSONAL_DATA_COMMENT=Comment: (optional)
+ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK=Send new confirmation key
+ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE=Sends out a new confirmation link to the user's assigned email address.
+ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_UNLOCKED=Error: Cannot send new confirmation link to user, account is already confirmed.
+ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_LOCKED=Error: Cannot send new confirmation link to user, account is locked.
+BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT=Send new confirmation link
+ADMIN_RESEND_USER_CONFIRMATION_LINK_TITLE=Do you want to send a new confirmation link to user {0} (id numer {1})?
+#Durch das Zuschicken eines neuen Best\u00e4tigungslinkes wird der alte ung\u00fcltig und nur noch der neue Link kann verwendet werden.
+ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE=By sending a new confirmation link to the user, the old link becomes invalid and only the new link can be used.
+PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Send new confirmation link
+CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK=Send new confirmation link:
index 6b921d2520ce5ba8463ac504b365ef1a4e9d86da..ed5b92c8e44d1c6f990fc7dee574ea7d9588fe7c 100644 (file)
                        <from-outcome>admin_delete_user</from-outcome>
                        <to-view-id>/admin/user/admin_user_delete.xhtml</to-view-id>
                </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_resend_user_confirm_link</from-outcome>
+                       <to-view-id>/admin/user/admin_user_resend_confirmation_link.xhtml</to-view-id>
+               </navigation-case>
                <navigation-case>
                        <from-outcome>admin_lock_user</from-outcome>
                        <to-view-id>/admin/user/admin_user_lock.xhtml</to-view-id>
index a00b77df71335ecda06d2b3d393e8ad045e096f3..d42ad00e440fac00dbfdc197a3a0c5aa427d3c91 100644 (file)
                                        </h:link>
                                </li>
 
-                               <ui:fragment rendered="#{beanHelper.user.userAccountStatus != 'UNCONFIRMED'}">
-                                       <li>
-                                               <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
-                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
-                                               </h:link>
-
-                                               <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
-                                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
-                                               </h:link>
-                                       </li>
-                               </ui:fragment>
+                               <li>
+                                       <h:link outcome="admin_resend_user_confirm_link" value="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK}" title="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
+                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                       </h:link>
+
+                                       <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
+                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                       </h:link>
+
+                                       <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                       </h:link>
+                               </li>
 
                                <li>
                                        <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}">
diff --git a/web/admin/user/admin_user_resend_confirmation_link.xhtml b/web/admin/user/admin_user_resend_confirmation_link.xhtml
new file mode 100644 (file)
index 0000000..e27b854
--- /dev/null
@@ -0,0 +1,108 @@
+<!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:define name="metadata">
+               <f:metadata>
+                       <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" />
+                       <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" />
+               </f:metadata>
+       </ui:define>
+
+       <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
+               <ui:define name="admin_title">
+                       <h:outputText value="#{msg.PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK}" />
+               </ui:define>
+
+               <ui:define name="content_header">
+                       <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK}" />
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{empty beanHelper.user}">
+                               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                                       <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" />
+                                       <ui:param name="styleClass" value="errors" />
+                               </ui:include>
+                       </ui:fragment>
+
+                       <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}">
+                               <h:panelGroup styleClass="table_medium" layout="block">
+                                       <div class="table_header">
+                                               <h:outputFormat value="#{msg.ADMIN_RESEND_USER_CONFIRMATION_LINK_TITLE}">
+                                                       <f:param value="#{beanHelper.user.userName}" />
+                                                       <f:param value="#{beanHelper.user.userId}" />
+                                               </h:outputFormat>
+                                       </div>
+
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" />
+                                               </div>
+
+                                               <div class="table_data_field">
+                                                       <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}">
+                                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
+                                                       </h:link>
+                                               </div>
+                                       </div>
+
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputLabel for="contactGender" value="#{msg.PERSONAL_DATA_GENDER}" />
+                                               </div>
+
+                                               <div class="table_data_field">
+                                                       <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
+                                               </div>
+                                       </div>
+
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
+                                               </div>
+
+                                               <div class="table_data_field">
+                                                       <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
+                                               </div>
+                                       </div>
+
+                                       <div class="para">
+                                               <div class="table_data_label">
+                                                       <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
+                                               </div>
+
+                                               <div class="table_data_field">
+                                                       <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
+                                               </div>
+                                       </div>
+
+                                       <div class="para">
+                                               <h:outputText styleClass="notice" value="#{msg.ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE}" />
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+
+                                               <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.resendConfirmationLink(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT}" />
+                                       </div>
+                               </h:panelGroup>
+                       </h:form>
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_UNLOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}">
+                               <f:param value="#{beanHelper.user.userName}" />
+                               <f:param value="#{beanHelper.user.userId}" />
+                       </h:outputFormat>
+
+                       <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_LOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}">
+                               <f:param value="#{beanHelper.user.userName}" />
+                               <f:param value="#{beanHelper.user.userId}" />
+                       </h:outputFormat>
+               </ui:define>
+       </ui:composition>
+</html>
index 95e4cca6389b65497eb55530451bf39ec6123fcf..d714d8856b5745e264d66342e1a021edcae33a3d 100644 (file)
@@ -42,7 +42,7 @@
 
                                        <div class="para">
                                                <div class="table_data_label">
-                                                       <h:outputText value="#{msg.ADMIN_EXPORT_USER_ID}" />
+                                                       <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" />
                                                </div>
 
                                                <div class="table_data_field">