From cb41f214d778da53caddb5b64566dc50c3de968f Mon Sep 17 00:00:00 2001 From: James Daugherty Date: Sun, 1 Dec 2024 17:45:16 -0500 Subject: [PATCH] feedback #551 --- .../plugins/web/taglib/FormTagLib.groovy | 9 ++-- .../grails/web/taglib/FormTagLibTests.groovy | 52 +++++++++++++------ 2 files changed, 41 insertions(+), 20 deletions(-) diff --git a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy index 7c238ab9c9..b2f6b2c659 100644 --- a/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy +++ b/grails-plugin-gsp/src/main/groovy/org/grails/plugins/web/taglib/FormTagLib.groovy @@ -524,7 +524,7 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar @Deprecated(since = '7.0.0') Closure actionSubmit = { attrs -> if (!attrs.value) { - throwTagError("Tag [actionSubmit] is missing required attribute [value]") + throwTagError('Tag [actionSubmit] is missing required attribute [value]') } attrs.tagName = "actionSubmit" @@ -578,13 +578,14 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar */ def formActionSubmit = { Map attrs -> if (!attrs.value) { - throwTagError("Tag [formActionSubmit] is missing required attribute [value]") + throwTagError('Tag [formActionSubmit] is missing required attribute [value]') } def elementId = attrs.remove('id') - // Reserved - attrs.remove('type') // forced to a submit because of this tag type + // the following attributes are reserved because this tag must be of type `submit` and the `formaction` attr + // will be generated by the link attributes. + attrs.remove('type') attrs.remove('formAction') out << '' @@ -294,7 +299,12 @@ class FormTagLibTests extends Specification implements TagLibUnitTest\n' @@ -302,7 +312,7 @@ class FormTagLibTests extends Specification implements TagLibUnitTest' @@ -310,7 +320,7 @@ class FormTagLibTests extends Specification implements TagLibUnitTest' @@ -319,7 +329,7 @@ class FormTagLibTests extends Specification implements TagLibUnitTest' @@ -328,12 +338,17 @@ class FormTagLibTests extends Specification implements TagLibUnitTest