Ignore:
Timestamp:
Apr 4, 2009, 6:41:25 PM (15 years ago)
Author:
gav
Message:

Installed help-balloons plugin.
Adjust security config to allow javascript and help-balloons folders.
Add "Repeat password" to change password.
Detailed Entry views, including only allow user to edit their own entries.
Adjust Entry constraints.
Add comments to layouts/main.gsp.
Work on TaskDetailed? view to show entry durations and allow editing.
Entry duration formatting to CSS and increased base font size to 14px.

File:
1 edited

Legend:

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

    r91 r98  
    2727        if (request.method == 'POST') {
    2828            def personInstance = Person.get(authenticateService.userDomain().id)
    29    
    30             personInstance.pass = params.pass
    31             personInstance.password = authenticateService.encodePassword(personInstance.pass)
    3229
    33             if (!personInstance.hasErrors() && personInstance.save()) {
    34                 //userCache.removeUserFromCache(personInstance.loginName)
    35                 flash.message = "Password changed successfully."
    36                 redirect(action:options)
     30            if(params.repeatPass == params.pass) {
     31                personInstance.pass = params.pass
     32                personInstance.password = authenticateService.encodePassword(personInstance.pass)
     33
     34                if (!personInstance.hasErrors() && personInstance.save()) {
     35                    //userCache.removeUserFromCache(personInstance.loginName)
     36                    flash.message = "Password changed successfully."
     37                    redirect(action:options)
     38                }
     39                else {
     40                    render(view:'changePassword',model:[personInstance:personInstance])
     41                }
    3742            }
    3843            else {
     44                flash.message = "Passwords must match."
     45//                 personInstance.addToErrors("Passwords must match.")
    3946                render(view:'changePassword',model:[personInstance:personInstance])
    40             }                         
     47            }
     48               
    4149        } 
    4250    }
Note: See TracChangeset for help on using the changeset viewer.