Changeset 1388


Ignore:
Timestamp:
Jan 13, 2011, 10:53:50 AM (6 years ago)
Author:
t.w.abma@…
Message:
  • added popup dialog with warning for first page of importer when not all fields are filled in or selected
Location:
trunk/grails-app
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/dbnp/importer/ImporterController.groovy

    r1387 r1388  
    2626 * $Date$
    2727 */
    28 @Secured(['IS_AUTHENTICATED_REMEMBERED'])
     28//@Secured(['IS_AUTHENTICATED_REMEMBERED'])
    2929class ImporterController {
    3030    // the pluginManager is used to check if the Grom
     
    127127            }
    128128            on("next") {
     129                flash.wizardErrors = [:]
     130               
    129131                // Study selected?
    130132                flow.importer_study = (params.study) ? Study.get(params.study.id.toInteger()) : null
    131133
    132                 // Trying to import a new study?
     134                // Trying to import data into an existing study?
    133135                if (flow.importer_study)
    134136                    if (flow.importer_study.canWrite(AuthenticationService.getLoggedInUser())) {
     
    136138                            success()
    137139                        } else {
    138                             error.log ".importer wizard not all fields are filled in"
     140                            log.error ".importer wizard not all fields are filled in"
     141                            this.appendErrorMap(['error': "Not all fields are filled in, please fill in or select all fields"], flash.wizardErrors)
    139142                            error()
    140143                        }
    141144                    } else
    142145                    {
    143                         error.log ".importer wizard wrong permissions"
     146                        log.error ".importer wizard wrong permissions"
     147                        this.appendErrorMap(['error': "You don't have the right permissions"], flash.wizardErrors)
     148
     149                        error()
    144150                    }
    145151                else {
     
    147153                            success()
    148154                        } else {
    149                             error.log ".importer wizard not all fields are filled in"
     155                            log.error ".importer wizard not all fields are filled in"
     156                            this.appendErrorMap(['error': "Not all fields are filled in, please fill in or select all fields"], flash.wizardErrors)
    150157                            error()
    151158                        }
  • trunk/grails-app/views/importer/pages/_page_one.gsp

    r1277 r1388  
    8585        </table>
    8686</af:page>
     87
     88<g:render template="common/error"/>
Note: See TracChangeset for help on using the changeset viewer.