]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/contact/unlink/admin_contact_fax_unlink.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / admin / contact / unlink / admin_contact_fax_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.faxNumber}" converter="FaxNumberConverter" 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:viewAction onPostback="true" action="#{beanHelper.notifyControllerContactConverted()}" />
14                         <f:viewAction onPostback="true" action="#{beanHelper.notifyControllerFaxNumberConverted()}" />
15                 </f:metadata>
16         </ui:define>
17
18         <ui:define name="admin_title">
19                 <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_FAX_NUMBER}" />
20         </ui:define>
21
22         <ui:define name="content_header">
23                 <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_FAX_NUMBER}" />
24         </ui:define>
25
26         <ui:define name="content">
27                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.faxNumber}" />
28
29                 <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
30
31                 <h:form id="form_unlink_contact_fax" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber == beanHelper.faxNumber}">
32                         <h:panelGroup styleClass="table" layout="block">
33                                 <div class="table-header">
34                                         <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_FAX_NUMBER_TITLE}" />
35                                 </div>
36
37                                 <div class="para">
38                                         <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
39                                 </div>
40
41                                 <div class="para">
42                                         <h:link outcome="admin_show_contact" value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}">
43                                                 <f:param name="contactId" value="#{adminContactPhoneController.contact.contactId}" />
44                                         </h:link>
45                                 </div>
46
47                                 <div class="para">
48                                         <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" contact="#{beanHelper.contact}" isShowPage="false" showAdminLinks="false" />
49                                 </div>
50
51                                 <div class="table-footer">
52                                         <h:commandButton styleClass="button-warning" type="submit" id="unlink_fax" value="#{msg.BUTTON_ADMIN_UNLINK_FAX_NUMBER}" action="#{adminContactPhoneController.unlinkFaxContactData()}" />
53                                 </div>
54                         </h:panelGroup>
55                 </h:form>
56
57                 <h:outputFormat styleClass="alert-danger" value="#{msg.ERROR_FAX_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber != beanHelper.faxNumber}">
58                         <f:param value="#{adminContactPhoneController.phoneId}" />
59                         <f:param value="#{adminContactPhoneController.contact.contactId}" />
60                 </h:outputFormat>
61         </ui:define>
62 </ui:composition>