Merge lp:~adiroiban/launchpad/bug-522188 into lp:launchpad
Proposed by
Adi Roiban
Status: | Merged |
---|---|
Approved by: | Graham Binns |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~adiroiban/launchpad/bug-522188 |
Merge into: | lp:launchpad |
Diff against target: |
140 lines (+87/-6) 4 files modified
lib/lp/app/templates/generic-edit-next-url.pt (+19/-0) lib/lp/translations/browser/configure.zcml (+2/-2) lib/lp/translations/browser/potemplate.py (+33/-2) lib/lp/translations/stories/standalone/xx-potemplate-edit.txt (+33/-2) |
To merge this branch: | bzr merge lp:~adiroiban/launchpad/bug-522188 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Graham Binns (community) | code | Approve | |
Review via email: mp+19395@code.launchpad.net |
To post a comment you must log in.
= Bug 522188 =
In the merge review for bug 340664, Curtis noted that the next_url for potemplate edit and admin forms is not using the referer address.
Below are his comments:
The behaviour of these actions is disconcerting. When I edit a a template,
the next_url is the template, but I expected to return to the all templates
view.
== Proposed fix ==
Use HTTP_REFERER in cancel_url and next_url
== Pre-implementation notes ==
In the merge review for bug 340664 Curtis suggested using HTTP_REFERER for cancel_url and next_url.
== Implementation details ==
Since the template edit and admin form are using the generic edit template, I have added the extra_info fill-slot there.
Please let me know if I should create a new template.
Since this looks like a generic behaviour, maybe we can have this implementation in LaunchpadForm and not in each class extending LaunchpadForm
== Tests ==
lp-test -t template-edit
== Demo and Q/A ==
Login as admin
1. Visit a series templates page: ie: https:/ /translations. launchpad. dev/evolution/ trunk/+ templates
Click 'Edit' or 'Admin' link for a template.
On the form page, click Update or Cancel, it should lead you back to the templates page.
2. Directly access the edit page at https:/ /translations. launchpad. dev/evolution/ trunk/+ pots/evolution- 2.2-test/ +edit
Click Update or Cancel. It should lead you to the template index page. ie https:/ /translations. launchpad. dev/evolution/ trunk/+ pots/evolution- 2.2-test
= Launchpad lint =
Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.
Linting changed files: app/templates/ generic- edit.pt translations/ browser/ potemplate. py translations/ stories/ standalone/ xx-potemplate- edit.txt
lib/lp/
lib/lp/
lib/lp/