Merge lp://qastaging/~danilo/launchpad/bug-110121 into lp://qastaging/launchpad

Proposed by Данило Шеган
Status: Merged
Approved by: Aaron Bentley
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp://qastaging/~danilo/launchpad/bug-110121
Merge into: lp://qastaging/launchpad
Diff against target: 51 lines
3 files modified
lib/lp/translations/browser/language.py (+1/-1)
lib/lp/translations/stories/standalone/xx-language.txt (+2/-2)
lib/lp/translations/templates/languageset-index.pt (+3/-3)
To merge this branch: bzr merge lp://qastaging/~danilo/launchpad/bug-110121
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+14255@code.qastaging.launchpad.net

Commit message

Use GET for search form submission on +languages page.

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

= Bug 110121 =

Use GET to submit search form on +languages page instead of POST.

== Tests ==

bin/test -vvt xx-language.txt

Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/translations/browser/language.py'
2--- lib/lp/translations/browser/language.py 2009-09-21 18:21:29 +0000
3+++ lib/lp/translations/browser/language.py 2009-10-31 12:10:28 +0000
4@@ -88,7 +88,7 @@
5 self.context = context
6 self.request = request
7 form = self.request.form
8- self.language_search = form.get('language_search')
9+ self.language_search = form.get('find')
10 self.search_requested = self.language_search is not None
11
12 @cachedproperty
13
14=== modified file 'lib/lp/translations/stories/standalone/xx-language.txt'
15--- lib/lp/translations/stories/standalone/xx-language.txt 2009-09-16 02:35:32 +0000
16+++ lib/lp/translations/stories/standalone/xx-language.txt 2009-10-31 12:10:28 +0000
17@@ -76,11 +76,11 @@
18 >>> print browser.url
19 http://translations.launchpad.dev/+languages
20
21- >>> text_search = browser.getControl(name='language_search')
22+ >>> text_search = browser.getControl(name='find')
23 >>> text_search.value = 'Spanish'
24 >>> browser.getControl('Find language', index=0).click()
25 >>> print browser.url
26- http://translations.launchpad.dev/+languages/+index
27+ http://translations.launchpad.dev/+languages/+index?find=Spanish
28
29 And following one of the found languages, we can see a brief information
30 about the selected language.
31
32=== modified file 'lib/lp/translations/templates/languageset-index.pt'
33--- lib/lp/translations/templates/languageset-index.pt 2009-09-17 14:45:59 +0000
34+++ lib/lp/translations/templates/languageset-index.pt 2009-10-31 12:10:28 +0000
35@@ -27,13 +27,13 @@
36
37 <div class="portlet">
38 <h2>Find a language in Launchpad</h2>
39- <form method="post">
40+ <form method="get">
41 <p>
42- <label for="language_search">
43+ <label for="find">
44 Language name/code contains:
45 </label>
46 <input
47- name="language_search" size="30"
48+ name="find" size="30"
49 tal:attributes="value view/language_search" />
50 <input
51 type="submit"