Changeset 432 for trunk/grails-app/taglib/dbnp
- Timestamp:
- May 18, 2010, 4:42:11 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/taglib/dbnp/studycapturing/WizardTagLib.groovy
r416 r432 240 240 241 241 // render a form element 242 out << '<div class="element">' 242 if (attrs.get('elementId')) { 243 out << '<div class="element" id="'+ attrs.remove('elementId') +'">' 244 } else { 245 out << '<div class="element">' 246 } 243 247 out << ' <div class="description">' 244 248 out << description … … 344 348 body 345 349 ) 350 } 351 352 /** 353 * render a set of radio form elements 354 * @param Map attrs 355 * @param Closure body (help text) 356 */ 357 def radioElement = { attrs, body -> 358 baseElement.call( 359 'radioList', 360 attrs, 361 body 362 ) 363 } 364 365 /** 366 * render a set of radio elements 367 * @param Map attrs 368 * @param Closure body (help text) 369 */ 370 def radioList = { attrs -> 371 def checked = true 372 373 attrs.elements.each { 374 out << radio( 375 name: attrs.name, 376 value: it, 377 checked: (attrs.value == it || (!attrs.value && checked)) 378 ) 379 out << it 380 checked = false 381 } 346 382 } 347 383
Note: See TracChangeset
for help on using the changeset viewer.