]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / contact / unlink / admin_contact_mobile_unlink.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <ui:composition
3         template="/WEB-INF/templates/admin/admin_base.tpl"
4         xmlns="http://www.w3.org/1999/xhtml"
5         xmlns:core="http://mxchange.org/jsf/core/widgets"
6         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
7         xmlns:h="http://xmlns.jcp.org/jsf/html"
8         xmlns:f="http://xmlns.jcp.org/jsf/core"
9         xmlns:p="http://primefaces.org/ui"
10         >
11
12         <ui:define name="metadata">
13                 <f:metadata>
14                         <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
15                         <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_CONTACT_ID_INVALID}" />
16                 </f:metadata>
17         </ui:define>
18
19         <ui:define name="document_admin_title">
20                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" />
21         </ui:define>
22
23         <ui:define name="content_header">
24                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" />
25         </ui:define>
26
27         <ui:define name="content">
28                 <core:outputMessageBox panelGroupId="errorHandlerUnlinkMobile" message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
29
30                 <core:outputMessageBox panelGroupId="errorHandlerUnlinkContact" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
31
32                 <h:form id="form_unlink_contact_mobile" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}">
33                         <h:panelGroup styleClass="table" layout="block">
34                                 <div class="table-header">
35                                         <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_MOBILE_NUMBER_TITLE}" />
36                                 </div>
37
38                                 <div class="para">
39                                         <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
40                                 </div>
41
42                                 <div class="para">
43                                         <p:link outcome="admin_show_contact" title="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA_TITLE}" value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}">
44                                                 <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
45                                         </p:link>
46                                 </div>
47
48                                 <div class="para">
49                                         <core:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" contact="#{beanHelper.contact}" renderShowLink="false" showAdminDropdownMenu="false" />
50                                 </div>
51
52                                 <p:commandButton
53                                         process="@form"
54                                         type="submit"
55                                         value="#{msg.BUTTON_ADMIN_UNLINK_MOBILE_NUMBER}"
56                                         action="#{adminContactPhoneController.unlinkMobileContactData()}"
57                                         />
58                         </h:panelGroup>
59                 </h:form>
60
61                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_MOBILE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber != beanHelper.mobileNumber}">
62                         <f:param value="#{beanHelper.mobileNumber.phoneId}" />
63                         <f:param value="#{beanHelper.contact.contactId}" />
64                 </h:outputFormat>
65         </ui:define>
66 </ui:composition>