]> 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 template="/WEB-INF/templates/admin/admin_base.tpl"
3                                 xmlns="http://www.w3.org/1999/xhtml"
4                                 xmlns:widgets="http://mxchange.org/jsf/core/widgets"
5                                 xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
6                                 xmlns:h="http://xmlns.jcp.org/jsf/html"
7                                 xmlns:f="http://xmlns.jcp.org/jsf/core">
8
9         <ui:define name="metadata">
10                 <f:metadata>
11                         <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}" />
12                         <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}" />
13                 </f:metadata>
14         </ui:define>
15
16         <ui:define name="admin_title">
17                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" />
18         </ui:define>
19
20         <ui:define name="content_header">
21                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" />
22         </ui:define>
23
24         <ui:define name="content">
25                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.mobileNumber}" />
26
27                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
28
29                 <h:form id="form_unlink_contact_mobile" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}">
30                         <h:panelGroup styleClass="table" layout="block">
31                                 <div class="table-header">
32                                         <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_MOBILE_NUMBER_TITLE}" />
33                                 </div>
34
35                                 <div class="para">
36                                         <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
37                                 </div>
38
39                                 <div class="para">
40                                         <h:link outcome="admin_show_contact" title="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA_TITLE}" value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}">
41                                                 <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
42                                         </h:link>
43                                 </div>
44
45                                 <div class="para">
46                                         <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" contact="#{beanHelper.contact}" isShowPage="false" showAdminLinks="false" />
47                                 </div>
48
49                                 <div class="table-footer">
50                                         <h:commandButton styleClass="button-warning" type="submit" id="button_unlink_mobile" value="#{msg.BUTTON_ADMIN_UNLINK_MOBILE_NUMBER}" action="#{adminContactPhoneController.unlinkMobileContactData()}" />
51                                 </div>
52                         </h:panelGroup>
53                 </h:form>
54
55                 <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}">
56                         <f:param value="#{beanHelper.mobileNumber.phoneId}" />
57                         <f:param value="#{beanHelper.contact.contactId}" />
58                 </h:outputFormat>
59         </ui:define>
60 </ui:composition>