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 b2f6b2c659..532183b9dc 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 @@ -677,6 +677,7 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar * @attr disabled Makes the resulting inputs and selects to be disabled. Is treated as a Groovy Truth. * @attr readonly Makes the resulting inputs and selects to be made read only. Is treated as a Groovy Truth. * @attr locale The locale to use for display formatting. Defaults to the current request locale and then the system default locale if not specified. + * @attr selectClass css class added to each select tag */ Closure datePicker = { attrs -> def out = out // let x = x ? @@ -797,6 +798,9 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar if (attrs.readonly) { out << ' readonly="readonly"' } + if (attrs.selectClass) { + out << ' class="'+attrs.selectClass+'"' + } out << '>' if (noSelection) { @@ -821,6 +825,9 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar if (attrs.readonly) { out << ' readonly="readonly"' } + if (attrs.selectClass) { + out << ' class="'+attrs.selectClass+'"' + } out << '>' if (noSelection) { @@ -847,6 +854,9 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar if (attrs.readonly) { out << ' readonly="readonly"' } + if (attrs.selectClass) { + out << ' class="'+attrs.selectClass+'"' + } out << '>' if (noSelection) { @@ -871,6 +881,9 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar if (attrs.readonly) { out << ' readonly="readonly"' } + if (attrs.selectClass) { + out << ' class="'+attrs.selectClass+'"' + } out << '>' if (noSelection) { @@ -902,6 +915,9 @@ class FormTagLib implements ApplicationContextAware, InitializingBean, TagLibrar if (attrs.readonly) { out << 'readonly="readonly"' } + if (attrs.selectClass) { + out << ' class="'+attrs.selectClass+'"' + } out << '>' if (noSelection) {