Ignore:
Timestamp:
Apr 5, 2009, 1:01:53 PM (15 years ago)
Author:
gav
Message:

Tweaking to the Change Password view, control and errors.
Remove /web-app/plugins dir.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/grails-app/controllers/AppCoreController.groovy

    r98 r99  
    2828            def personInstance = Person.get(authenticateService.userDomain().id)
    2929
    30             if(params.repeatPass == params.pass) {
     30            if(params.confirmPass == params.pass) {
    3131                personInstance.pass = params.pass
    3232                personInstance.password = authenticateService.encodePassword(personInstance.pass)
     
    4242            }
    4343            else {
    44                 flash.message = "Passwords must match."
    45 //                 personInstance.addToErrors("Passwords must match.")
     44                personInstance.errors.reject('person.pass.doesNotMatch',            // Error code, see grails-app/i18n/message.properties
     45                                                                ['pass', 'class Person'].toArray(),      // Groovy ListArray cast to Object[]
     46                                                                 '[NothingUseMessageProperites]')  // Default mapping string.
    4647                render(view:'changePassword',model:[personInstance:personInstance])
    4748            }
Note: See TracChangeset for help on using the changeset viewer.