Merge lp:~gary/launchpad/bug770387 into lp:launchpad

Proposed by Gary Poster
Status: Merged
Approved by: Benji York
Approved revision: no longer in the source branch.
Merged at revision: 12935
Proposed branch: lp:~gary/launchpad/bug770387
Merge into: lp:launchpad
Diff against target: 25 lines (+5/-0)
2 files modified
lib/lp/registry/browser/person.py (+2/-0)
lib/lp/registry/stories/person/xx-person-edit.txt (+3/-0)
To merge this branch: bzr merge lp:~gary/launchpad/bug770387
Reviewer Review Type Date Requested Status
Benji York (community) code Approve
Review via email: mp+59269@code.launchpad.net

Commit message

[r=benji][bug=770387] add a confirmation that we saved your personal details on the +edit page

Description of the change

This is a very simple branch to add a confirmation that we saved your personal details on the +edit page. It is not specific to the bug that this nominally fixes because the entire page had the behavior described for the new field.

I considered constructing a more specific message about what you changed, but it would have made the confirmation message more unwieldy; it doesn't have much precedence in Launchpad, if any, to my knowledge; and the Launchpad form machinery is not currently structured in such a way as to provide information about what was changed.

Lint is happy.

To post a comment you must log in.
Revision history for this message
Benji York (benji) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/person.py'
2--- lib/lp/registry/browser/person.py 2011-04-26 16:39:33 +0000
3+++ lib/lp/registry/browser/person.py 2011-04-27 18:48:31 +0000
4@@ -4223,6 +4223,8 @@
5 removeSecurityProxy(self.context).name = new_name
6 del data['name']
7 self.updateContextFromData(data)
8+ self.request.response.addInfoNotification(
9+ 'The changes to your personal details have been saved.')
10
11
12 class PersonBrandingView(BrandingChangeView):
13
14=== modified file 'lib/lp/registry/stories/person/xx-person-edit.txt'
15--- lib/lp/registry/stories/person/xx-person-edit.txt 2011-04-26 13:57:15 +0000
16+++ lib/lp/registry/stories/person/xx-person-edit.txt 2011-04-27 18:48:31 +0000
17@@ -40,6 +40,9 @@
18
19 >>> browser.url
20 'http://launchpad.dev/~rayjay'
21+ >>> ('The changes to your personal details have been saved.'
22+ ... in browser.contents)
23+ True
24
25 Now we check to make sure the displayname was changed and stripped.
26