- Timestamp:
- Oct 20, 2010, 6:16:20 PM (13 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy
r952 r953 448 448 // handle form data 449 449 eventPage(flow, flash, params) ? success() : error() 450 }.to " groups"450 }.to "eventsNext" 451 451 on("quickSave") { 452 452 // handle form data 453 453 eventPage(flow, flash, params) ? success() : error() 454 454 }.to "waitForSave" 455 } 456 457 // decide to show a warning page or not 458 eventsNext { 459 action { 460 def assigned = false 461 462 // check if all sampling events are in an eventGroup 463 flow.study.samplingEvents.each() { samplingEvent -> 464 // iterate through eventGroups 465 flow.study.eventGroups.each() { eventGroup -> 466 if ( eventGroup.samplingEvents.find { it.equals(samplingEvent) } ) { 467 assigned = true 468 } 469 } 470 } 471 472 if (assigned) { 473 toGroupsPage() 474 } else { 475 toWarningPage() 476 } 477 } 478 on("toWarningPage").to "unassignedSamplingEventWarning" 479 on("toGroupsPage").to "groups" 480 } 481 482 // warning page for unassigned samplingEvent 483 unassignedSamplingEventWarning { 484 render(view: "_unassigned_samplingEvent_warning") 485 onRender { 486 flow.page = 4 487 success() 488 } 489 on("next").to "groups" 490 on("previous").to "events" 455 491 } 456 492 … … 475 511 }.to "waitForSave" 476 512 } 477 478 // decide to show a warning page or not479 480 513 481 514 // sample 'previous' page with warning
Note: See TracChangeset
for help on using the changeset viewer.