]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/contact/unlink/admin_contact_landline_unlink.xhtml
WIP - Please cherry-pick:
[jjobs-war.git] / web / admin / contact / unlink / admin_contact_landline_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                                 xmlns:p="http://primefaces.org/ui">
9
10         <ui:define name="metadata">
11                 <f:metadata>
12                         <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_PHONE_ID_INVALID}" />
13                         <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}" />
14                 </f:metadata>
15         </ui:define>
16
17         <ui:define name="admin_title">
18                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" />
19         </ui:define>
20
21         <ui:define name="content_header">
22                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" />
23         </ui:define>
24
25         <ui:define name="content">
26                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.landLineNumber}" />
27
28                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
29
30                 <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}">
31                         <h:panelGroup styleClass="table" layout="block">
32                                 <div class="table-header">
33                                         <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER_TITLE}" />
34                                 </div>
35
36                                 <div class="para">
37                                         <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
38                                 </div>
39
40                                 <div class="para">
41                                         <p:link outcome="admin_show_contact" value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}">
42                                                 <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
43                                         </p:link>
44                                 </div>
45
46                                 <div class="para">
47                                         <widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" contact="#{beanHelper.contact}" renderShowLink="false" showAdminMiniLinks="false" />
48                                 </div>
49
50                                 <div class="table-footer">
51                                         <p:commandButton styleClass="button-warning" type="submit" id="button_unlink_landline" value="#{msg.BUTTON_ADMIN_UNLINK_LAND_LINE_NUMBER}" action="#{adminContactPhoneController.unlinkLandLineContactData()}" />
52                                 </div>
53                         </h:panelGroup>
54                 </h:form>
55
56                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_LAND_LINE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber != beanHelper.landLineNumber}">
57                         <f:param value="#{beanHelper.landLineNumber.phoneId}" />
58                         <f:param value="#{beanHelper.contact.contactId}" />
59                 </h:outputFormat>
60         </ui:define>
61 </ui:composition>