]> git.mxchange.org Git - pizzaservice-war.git/blobdiff - web/admin/generic_product/admin_generic_product_edit.xhtml
Please cherry-pick:
[pizzaservice-war.git] / web / admin / generic_product / admin_generic_product_edit.xhtml
diff --git a/web/admin/generic_product/admin_generic_product_edit.xhtml b/web/admin/generic_product/admin_generic_product_edit.xhtml
new file mode 100644 (file)
index 0000000..90a562c
--- /dev/null
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       template="/WEB-INF/templates/admin/admin_base.tpl"
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:p="http://primefaces.org/ui"
+       >
+
+       <ui:define name="metadata">
+               <f:metadata>
+                       <f:viewParam
+                               name="productId"
+                               value="#{adminGenericProductActionController.currentProduct}"
+                               converter="GenericProductConverter"
+                               required="true"
+                               requiredMessage="#{product.ERROR_PARAMETER_PRODUCT_ID_NOT_SET}"
+                               converterMessage="#{product.PARAMETER_PRODUCT_ID_INVALID}"
+                               />
+
+                       <f:viewAction
+                               action="#{adminGenericProductActionController.copyAllProductProperties()}"
+                               />
+               </f:metadata>
+       </ui:define>
+
+       <ui:define name="document_admin_title">
+               <h:outputText value="#{product.PAGE_TITLE_ADMIN_GENERIC_PRODUCT_EDIT}" />
+       </ui:define>
+
+       <ui:define name="content_header">
+               <h:outputText value="#{product.CONTENT_TITLE_ADMIN_GENERIC_PRODUCT_EDIT}" />
+       </ui:define>
+
+       <ui:define name="content">
+               <h:form
+                       id="admin-form-edit-generic-product"
+                       rendered="#{not empty adminGenericProductActionController.currentProduct}"
+                       >
+                       <h:inputHidden value="#{adminGenericProductActionController.productId}" />
+
+                       <p:panelGrid
+                               columns="1"
+                               layout="grid"
+                               >
+                               <f:facet name="header">
+                                       <h:outputFormat
+                                               value="#{product.ADMIN_EDIT_GENERIC_PRODUCT_TITLE}"
+                                               title="#{local[adminGenericProductActionController.productI18nKey]}"
+                                               >
+                                               <f:param value="#{adminGenericProductActionController.productId}" />
+                                       </h:outputFormat>
+                               </f:facet>
+
+                               <h:panelGroup styleClass="para" layout="block">
+                                       <h:outputText value="#{product.ADMIN_EDIT_GENERIC_PRODUCT_MINIMUM_DATA}" />
+                               </h:panelGroup>
+
+                               <ui:include src="/WEB-INF/templates/admin/generic_product/admin_form_generic_product_data.tpl">
+                                       <ui:param name="bypassDuplicateI18nKey" value="true" />
+                               </ui:include>
+
+                               <f:facet name="footer">
+                                       <p:panelGrid columns="2" layout="grid">
+                                               <p:commandButton
+                                                       type="reset"
+                                                       value="#{msg.BUTTON_RESET_FORM}"
+                                                       />
+
+                                               <p:commandButton
+                                                       type="submit"
+                                                       value="#{product.BUTTON_ADMIN_EDIT_GENERIC_PRODUCT}"
+                                                       action="#{adminGenericProductActionController.updateProduct()}"
+                                                       />
+                                       </p:panelGrid>
+                               </f:facet>
+                       </p:panelGrid>
+               </h:form>
+       </ui:define>
+</ui:composition>