]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/WEB-INF/templates/admin/landline/admin_form_add_contact_landline.tpl
Please cherry-pick:
[jjobs-war.git] / web / WEB-INF / templates / admin / landline / admin_form_add_contact_landline.tpl
index ed187a1a314efbb40c662c3da2c2c102f0be9616..6b50af2594648fddaa75b8e4c7b3ee5b129090a4 100644 (file)
@@ -1,15 +1,18 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <ui:composition
        xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:core="http://mxchange.org/jsf/core/widgets"
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:p="http://primefaces.org/ui"
+       >
 
-       <h:outputText styleClass="errors" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" rendered="#{empty beanHelper.contact}" />
+       <core:outputMessageBox id="error-helper-contact-add-landline" message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" />
 
        <h:form id="form_add_contact_landline" rendered="#{not empty beanHelper.contact}">
-               <h:panelGroup styleClass="table_medium" layout="block">
-                       <div class="table_header">
+               <h:panelGroup layout="block">
+                       <div class="table-header">
                                <h:outputText value="#{msg.ADMIN_ADD_CONTACT_LAND_LINE_NUMBER_FORM_TITLE}" />
                        </div>
 
                                <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" />
                        </div>
 
-                       <div class="table_row">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="choosenLandLineNumber" value="#{msg.ADMIN_SELECT_LAND_LINE_NUMBER}" />
+                       <h:panelGroup styleClass="table-row" layout="block">
+                               <div class="table-left-medium">
+                                       <p:outputLabel for="landLineNumber" value="#{msg.ADMIN_SELECT_LAND_LINE_NUMBER}" />
                                </div>
 
-                               <div class="table_right_medium">
-                                       <h:selectOneMenu styleClass="select right_space" id="choosenLandLineNumber" value="#{adminPhoneController.choosenLandLineNumber}">
-                                               <f:converter converterId="LandLineConverter" />
-                                               <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
+                               <div class="table-right-medium">
+                                       <p:selectOneMenu styleClass="select" id="landLineNumber" value="#{adminPhoneController.landLineNumber}">
+                                               <f:converter converterId="LandLineNumberConverter" />
+                                               <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                <f:selectItems value="#{adminPhoneController.allNonLinkedLandLineNumbers()}" var="landlineNumber" itemValue="#{landlineNumber}" itemLabel="#{landlineNumber.phoneCountry.countryExternalDialPrefix} (#{landlineNumber.phoneAreaCode}) #{landlineNumber.phoneNumber}" />
-                                       </h:selectOneMenu>
+                                       </p:selectOneMenu>
                                </div>
-                       </div>
+                       </h:panelGroup>
 
                        <div class="para">
                                <h:outputText value="#{msg.ADMIN_OR_ENTER_CONTACT_NEW_LAND_LINE_DATA}" />
                        </div>
 
-                       <div class="table_row">
-                               <div class="table_left_medium">
-                                       <h:outputLabel for="landlineNumber" value="#{msg.ADMIN_PERSONAL_DATA_LAND_LINE_NUMBER}" />
-                               </div>
-
-                               <div class="table_right_medium">
-                                       <ui:include src="/WEB-INF/templates/generic/landline_selection_box.tpl">
-                                               <ui:param name="targetController" value="#{adminPhoneController}" />
-                                       </ui:include>
-                               </div>
-                       </div>
-
-                       <div class="table_footer">
-                               <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                               <h:commandButton styleClass="submit" type="submit" action="#{adminContactPhoneController.doLinkAddLandLineNumber(beanHelper.contact)}" value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_LAND_LINE_NUMBER}" />
-                       </div>
+                       <core:outputLandLineInputTableRow targetController="#{adminPhoneController}" labelMessage="#{msg.ADMIN_PERSONAL_DATA_LAND_LINE_NUMBER}" />
+
+                       <p:panelGrid columns="2" layout="grid">
+                               <p:commandButton
+                                       type="reset"
+                                       value="#{msg.BUTTON_RESET_FORM}"
+                                       />
+
+                               <p:commandButton
+                                       process="@form"
+                                       type="submit"
+                                       action="#{adminContactPhoneController.doLinkAddLandLineNumber(beanHelper.contact)}"
+                                       value="#{msg.BUTTON_ADMIN_LINK_ADD_CONTACT_LAND_LINE_NUMBER}"
+                                       >
+                                       <f:param name="contactId" value="#{param.contactId}" />
+                               </p:commandButton>
+                       </p:panelGrid>
                </h:panelGroup>
        </h:form>
 </ui:composition>