]> git.mxchange.org Git - jjobs-war.git/blob - web/admin/contact/unlink/admin_contact_landline_unlink.xhtml
Please cherry-pick (Massive rewrite):
[jjobs-war.git] / web / admin / contact / unlink / admin_contact_landline_unlink.xhtml
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html
3         lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
4         xmlns="http://www.w3.org/1999/xhtml"
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
10         <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
11                 <ui:define name="metadata">
12                         <f:metadata>
13                                 <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}" />
14                                 <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}" />
15                         </f:metadata>
16                 </ui:define>
17
18                 <ui:define name="admin_title">
19                         <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" />
20                 </ui:define>
21
22                 <ui:define name="content_header">
23                         <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" />
24                 </ui:define>
25
26                 <ui:define name="content">
27                         <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}">
28                                 <h:panelGroup styleClass="table" layout="block">
29                                         <div class="table_header">
30                                                 <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER_TITLE}" />
31                                         </div>
32
33                                         <div class="para">
34                                                 <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
35                                         </div>
36
37                                         <div class="para">
38                                                 <h:link outcome="admin_show_contact" value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}">
39                                                         <f:param name="contactId" value="#{beanHelper.contact.contactId}" />
40                                                 </h:link>
41                                         </div>
42
43                                         <div class="para">
44                                                 <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl">
45                                                         <ui:param name="isShowPage" value="#{false}" />
46                                                         <ui:param name="showAdminLinks" value="#{false}" />
47                                                 </ui:include>
48                                         </div>
49
50                                         <div class="table_footer">
51                                                 <h:commandButton styleClass="unlink_button" type="submit" id="unlink_landline" value="#{msg.BUTTON_ADMIN_UNLINK_LAND_LINE_NUMBER}" action="#{adminContactPhoneController.unlinkLandLineContactData()}" />
52                                         </div>
53                                 </h:panelGroup>
54                         </h:form>
55
56                         <ui:fragment rendered="#{empty beanHelper.landLineNumber}">
57                                 <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
58                                         <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" />
59                                         <ui:param name="styleClass" value="errors" />
60                                 </ui:include>
61                         </ui:fragment>
62
63                         <ui:fragment rendered="#{empty beanHelper.contact}">
64                                 <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
65                                         <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" />
66                                         <ui:param name="styleClass" value="errors" />
67                                 </ui:include>
68                         </ui:fragment>
69
70                         <h:outputFormat styleClass="errors" 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}">
71                                 <f:param value="#{beanHelper.landLineNumber.phoneId}" />
72                                 <f:param value="#{beanHelper.contact.contactId}" />
73                         </h:outputFormat>
74                 </ui:define>
75         </ui:composition>
76 </html>