Ignore:
Timestamp:
Mar 8, 2010, 6:25:07 PM (11 years ago)
Author:
duh
Message:
  • increased session lifetime to 7 days
  • improved wizard study template selector
  • wizard study page now contains study template fields (which are not yet handled)
  • added protocol selector to event descriptions page
  • renamed the 'blood sampling' protocol to 'Blood sampling' (it was duplicately named 'Liver sampling')
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/studycapturing/WizardController.groovy

    r240 r246  
    9191                        }
    9292                        on("switchTemplate") {
    93                                 println "switching template..."
    94                                 println params
    9593                                this.handleStudy(flow, flash, params)
    9694                        }.to "study"
     
    159157                        }.to "subjects"
    160158                        on("next") {
    161                                 println flow.subjectTemplates
    162                                 println flow.subjects
    163159                                flash.errors = new LinkedHashMap()
    164160
     
    200196                                // fetch classification by name (as posted by the form)
    201197                                //params.classification = Term.findByName(params.classification)
     198
     199                                // fetch protocol by name (as posted by the form)
     200                                params.protocol = Protocol.findByName(params.protocol)
    202201
    203202                                // transform checkbox form value to boolean
     
    452451
    453452                // if a template is selected, get template instance
    454                 if (params.get('template')) {
    455                         params.template = Template.findByName(params.get('template'))
     453                def template = params.remove('template')
     454                if (template instanceof String && template.size() > 0) {
     455                        params.template = Template.findByName(template)
     456                } else if (template instanceof Template) {
     457                        params.template = template
    456458                }
    457459
     
    489491                        it.name = params.get('eventDescription_' + id + '_name')
    490492                        it.description = params.get('eventDescription_' + id + '_description')
     493                        it.protocol = Protocol.findByName(params.get('eventDescription_' + id + '_protocol'))
    491494                        //it.classification = Term.findByName(params.get('eventDescription_' + id + '_classification'))
    492495                        it.isSamplingEvent = (params.containsKey('eventDescription_' + id + '_isSamplingEvent'))
Note: See TracChangeset for help on using the changeset viewer.