From 921234536f5bc582eda2efb1543c55923544f2b1 Mon Sep 17 00:00:00 2001 From: Ted Nathan Husted Date: Fri, 1 Sep 2006 03:20:45 +0000 Subject: [PATCH] WW-1425 The form tag is generating incomplete and/or unnecessary references to dojo, reported by Matt Raible Add if clause to check parameter and update affected tests. git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@439153 13f79535-47bb-0310-9956-ffa450edef68 --- core/src/main/resources/template/simple/form-close.ftl | 2 ++ core/src/main/resources/template/simple/form.ftl | 3 ++- .../resources/org/apache/struts2/views/jsp/ui/Formtag-1.txt | 3 --- .../resources/org/apache/struts2/views/jsp/ui/Formtag-10.txt | 3 --- .../resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt | 3 --- .../resources/org/apache/struts2/views/jsp/ui/Formtag-3.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-4.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-5.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-7.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-8.txt | 4 ---- .../resources/org/apache/struts2/views/jsp/ui/Formtag-9.txt | 3 --- 13 files changed, 4 insertions(+), 41 deletions(-) diff --git a/core/src/main/resources/template/simple/form-close.ftl b/core/src/main/resources/template/simple/form-close.ftl index 5152fa176..4340c3b87 100644 --- a/core/src/main/resources/template/simple/form-close.ftl +++ b/core/src/main/resources/template/simple/form-close.ftl @@ -68,5 +68,7 @@ dojo.require("dojo.event.connect"); <#-- Code that will add javascript needed for tooltips --><#t/> +<#if (parameters.hasTooltip?default(false))><#t/> <#lt/> <#lt/> +<#t/> diff --git a/core/src/main/resources/template/simple/form.ftl b/core/src/main/resources/template/simple/form.ftl index a2927c96f..11828179e 100644 --- a/core/src/main/resources/template/simple/form.ftl +++ b/core/src/main/resources/template/simple/form.ftl @@ -26,7 +26,8 @@ <#if parameters.method?exists> method="${parameters.method?html}"<#rt/> -<#else>method="POST"<#rt/> +<#else> + method="POST"<#rt/> <#if parameters.enctype?exists> enctype="${parameters.enctype?html}"<#rt/> diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-1.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-1.txt index eb73cbe33..850faa108 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-1.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-1.txt @@ -2,6 +2,3 @@
- - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-10.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-10.txt index efa7886d2..5e6c687f4 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-10.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-10.txt @@ -2,6 +2,3 @@
- - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt index 9de19b43e..2bec0d15c 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-11.txt @@ -28,7 +28,3 @@ selectAllOptionsExceptSome(updownselectObj, "key", ""); }); - - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt index e8e045da2..6c351d825 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-2.txt @@ -29,9 +29,6 @@ }); - - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-4.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-4.txt index bfbad183d..6cb85c474 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-4.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-4.txt @@ -2,7 +2,3 @@
- - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-5.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-5.txt index c2dee453f..9ceee9b60 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-5.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-5.txt @@ -2,7 +2,3 @@
- - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt index 3faaed0b0..e0ae67ef1 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-6.txt @@ -27,7 +27,3 @@ selectAllOptionsExceptSome(updownselectObj, "key", ""); }); - - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-7.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-7.txt index 7e13fb87f..5cbaf3033 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-7.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-7.txt @@ -2,7 +2,3 @@
- - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-8.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-8.txt index c2dee453f..9ceee9b60 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-8.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-8.txt @@ -2,7 +2,3 @@
- - - - diff --git a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-9.txt b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-9.txt index 81ad550ce..6fdb01aae 100644 --- a/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-9.txt +++ b/core/src/test/resources/org/apache/struts2/views/jsp/ui/Formtag-9.txt @@ -2,6 +2,3 @@
- - -