Changeset 99


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

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

Location:
trunk/src
Files:
1 deleted
3 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            }
  • trunk/src/grails-app/i18n/messages.properties

    r98 r99  
    11person.pass.minSize.notmet=Password is less than the minimum size of [{3}]
    22person.pass.blank=Password cannot be blank
     3person.pass.doesNotMatch=Passwords must match
    34
    45entry.duration=Duration
  • trunk/src/grails-app/views/appCore/changePassword.gsp

    r98 r99  
    3838
    3939                    <tr class="prop">
    40                         <td valign="top" class="name"><label for="repeatPass">Repeat password:</label></td>
     40                        <td valign="top" class="name"><label for="confirmPass">Confirm password:</label></td>
    4141                        <td valign="top" class="value">
    42                             <input type="password" id="repeatPass" name="repeatPass" />
     42                            <input type="password" id="confirmPass" name="confirmPass" />
    4343                        </td>
    4444                    </tr>
Note: See TracChangeset for help on using the changeset viewer.