diff --git a/action/src/main/resources/template/ajax/form-close.ftl b/action/src/main/resources/template/ajax/form-close.ftl index 71d6f2b67..ec1b4f8e5 100644 --- a/action/src/main/resources/template/ajax/form-close.ftl +++ b/action/src/main/resources/template/ajax/form-close.ftl @@ -1,11 +1,13 @@ - +#if> + diff --git a/action/src/main/resources/template/simple/form-close.ftl b/action/src/main/resources/template/simple/form-close.ftl index b6701ba13..57a639879 100644 --- a/action/src/main/resources/template/simple/form-close.ftl +++ b/action/src/main/resources/template/simple/form-close.ftl @@ -1,57 +1,68 @@ - +<#if (parameters.customOnsubmitEnabled?if_exists)> +#if> <#-- diff --git a/action/src/main/resources/template/simple/form.ftl b/action/src/main/resources/template/simple/form.ftl index eb5a350b5..5ff68f2cf 100644 --- a/action/src/main/resources/template/simple/form.ftl +++ b/action/src/main/resources/template/simple/form.ftl @@ -1,8 +1,8 @@ <#if (parameters.validate?default(false) == false)><#rt/> <#if parameters.onsubmit?exists><#rt/> - ${tag.addParameter('onsubmit', "${parameters.onsubmit}; customOnsubmit(); return true;") } + ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return true;") } <#else> - ${tag.addParameter('onsubmit', "customOnsubmit(); return true;") } + ${tag.addParameter('onsubmit', "return true;") } #if> #if>
diff --git a/action/src/main/resources/template/xhtml/form-validate.ftl b/action/src/main/resources/template/xhtml/form-validate.ftl index b30bad8aa..3f506b0dd 100644 --- a/action/src/main/resources/template/xhtml/form-validate.ftl +++ b/action/src/main/resources/template/xhtml/form-validate.ftl @@ -1,8 +1,8 @@ <#if parameters.validate?default(false) == true> <#if parameters.onsubmit?exists> - ${tag.addParameter('onsubmit', "${parameters.onsubmit}; customOnsubmit(); return validateForm_${parameters.id}();")} + ${tag.addParameter('onsubmit', "${parameters.onsubmit}; return validateForm_${parameters.id}();")} <#else> - ${tag.addParameter('onsubmit', "customOnsubmit(); return validateForm_${parameters.id}();")} + ${tag.addParameter('onsubmit', "return validateForm_${parameters.id}();")} #if> #if> diff --git a/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-1.txt b/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-1.txt index 4249f681a..bc4175617 100644 --- a/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-1.txt +++ b/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-1.txt @@ -1,11 +1,7 @@ - - - diff --git a/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-2.txt b/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-2.txt index c962eb835..cda3d763a 100644 --- a/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-2.txt +++ b/action/src/test/resources/org/apache/struts/action2/views/jsp/ui/Formtag-2.txt @@ -1,5 +1,5 @@ -