From: Roland Häder <roland@mxchange.org>
Date: Thu, 13 Dec 2018 21:47:24 +0000 (+0100)
Subject: Please cherry-pick:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=56511ac4d515afffd96e8697ac6596c9327d2ca7;p=jfinancials-war.git

Please cherry-pick:
- removed "id" where it is not explicitly needed
- removed process="@form" as later one hides a more serious bug (was wrong
  scope)
- removed contenttype from f:view which makes rendering AJAX requests by
  Primefaces trigger an exception
- rewrote single-line attributes to distinct lines (each attribute of a tag in
  a separate line for better readability) in master.tpl

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/web/WEB-INF/templates/guest/user/guest_login_form.tpl b/web/WEB-INF/templates/guest/user/guest_login_form.tpl
index 4974b565..b55fd895 100644
--- a/web/WEB-INF/templates/guest/user/guest_login_form.tpl
+++ b/web/WEB-INF/templates/guest/user/guest_login_form.tpl
@@ -8,7 +8,7 @@
 	>
 
 	<h:panelGroup id="user_login_content" layout="block" rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
-		<h:form id="form_user_login">
+		<h:form>
 			<h:panelGroup styleClass="table" layout="block">
 				<div class="table-header">
 					<h:outputText value="#{msg.GUEST_ENTER_USER_LOGIN_DATA_TITLE}" />
@@ -55,7 +55,6 @@
 						/>
 
 					<p:commandButton
-						process="@form"
 						type="submit"
 						action="#{userLoginController.doUserLogin()}"
 						value="#{msg.BUTTON_USER_LOGIN}"
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
index 4b416b65..fcd38724 100644
--- a/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
+++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
@@ -7,7 +7,7 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<h:form id="form_register_page1" rendered="#{featureController.isFeatureEnabled('user_registration')}">
+	<h:form rendered="#{featureController.isFeatureEnabled('user_registration')}">
 		<h:panelGroup layout="block">
 			<div class="table-header">
 				<h:outputText value="#{msg.GUEST_REGISTRATION_PAGE1_TITLE}" />
@@ -92,7 +92,6 @@
 					/>
 
 				<p:commandButton
-					process="@form"
 					type="submit"
 					value="#{msg.BUTTON_CONTINUE_REGISTER_PAGE2}"
 					action="#{userRegistrationController.doRegisterMultiPage1()}"
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
index 910cd9cf..b6342704 100644
--- a/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
+++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_page2.tpl
@@ -7,7 +7,7 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<h:form id="form_register_page2" rendered="#{featureController.isFeatureEnabled('user_registration')}">
+	<h:form rendered="#{featureController.isFeatureEnabled('user_registration')}">
 		<h:panelGroup layout="block">
 			<div class="table-header">
 				<h:outputText value="#{msg.GUEST_REGISTRATION_PAGE2_TITLE}" />
@@ -22,7 +22,6 @@
 					/>
 
 				<p:commandButton
-					process="@form"
 					type="submit"
 					value="#{msg.BUTTON_FINISH_REGISTRATION}"
 					action="#{userRegistrationController.doFinishRegistration()}"
diff --git a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
index a359818c..d99a8f80 100644
--- a/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
+++ b/web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
@@ -7,7 +7,7 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<h:form id="form_register_single" rendered="#{featureController.isFeatureEnabled('user_registration')}">
+	<h:form rendered="#{featureController.isFeatureEnabled('user_registration')}">
 		<h:panelGroup layout="block">
 			<div class="table-header">
 				<h:outputText value="#{msg.GUEST_REGISTRATION_TITLE}" />
@@ -96,7 +96,6 @@
 					/>
 
 				<p:commandButton
-					process="@form"
 					type="submit"
 					value="#{msg.BUTTON_FINISH_REGISTRATION}"
 					action="#{userRegistrationController.doFinishRegistration()}"
diff --git a/web/WEB-INF/templates/master.tpl b/web/WEB-INF/templates/master.tpl
index a9da0c56..27c9d091 100644
--- a/web/WEB-INF/templates/master.tpl
+++ b/web/WEB-INF/templates/master.tpl
@@ -1,15 +1,25 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition xmlns="http://www.w3.org/1999/xhtml"
-				xmlns:f="http://java.sun.com/jsf/core"
-				xmlns:h="http://java.sun.com/jsf/html"
-				xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-				xmlns:p="http://primefaces.org/ui"
-				xmlns:pm="http://primefaces.org/mobile">
+<ui:composition
+	xmlns="http://www.w3.org/1999/xhtml"
+	xmlns:f="http://java.sun.com/jsf/core"
+	xmlns:h="http://java.sun.com/jsf/html"
+	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+	xmlns:p="http://primefaces.org/ui"
+	xmlns:pm="http://primefaces.org/mobile"
+	>
+	<h:doctype
+		rootElement="html"
+		public="-//W3C//DTD XHTML 1.0 Transitional//EN"
+		system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+		/>
+
+	<html
+		lang="#{localizationController.locale.language}"
+		xml:lang="#{localizationController.locale.language}"
+		xmlns="http://www.w3.org/1999/xhtml"
+		>
+		<f:view locale="#{localizationController.locale}" />
 
-	<h:doctype rootElement="html" public="-//W3C//DTD XHTML 1.0 Transitional//EN" system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>
-
-	<html lang="#{localizationController.locale.language}" xml:lang="#{localizationController.locale.language}" xmlns="http://www.w3.org/1999/xhtml">
-		<f:view locale="#{localizationController.locale}" contentType="text/html" />
 		<h:head>
 			<f:facet name="first">
 				<ui:insert name="metadata" />
diff --git a/web/WEB-INF/templates/widgets/locale_change_widget.tpl b/web/WEB-INF/templates/widgets/locale_change_widget.tpl
index c7d57c75..f02b18a2 100644
--- a/web/WEB-INF/templates/widgets/locale_change_widget.tpl
+++ b/web/WEB-INF/templates/widgets/locale_change_widget.tpl
@@ -7,7 +7,7 @@
 	xmlns:p="http://primefaces.org/ui"
 	>
 
-	<h:form id="form-change-locale">
+	<h:form>
 		<p:outputPanel styleClass="ui-g">
 			<p:outputPanel styleClass="ui-g-12 ui-md-6">
 				<p:selectOneMenu value="#{localizationController.localeCode}">
@@ -26,7 +26,6 @@
 
 			<p:outputPanel styleClass="ui-g-12 ui-md-6">
 				<p:commandButton
-					process="@form"
 					type="submit"
 					actionListener="#{localizationController.doChangeLocale()}"
 					value="#{msg.BUTTON_CHANGE_LOCALE}"