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
=== modified file 'lib/lp/translations/browser/language.py'
--- lib/lp/translations/browser/language.py 2009-09-21 18:21:29 +0000
+++ lib/lp/translations/browser/language.py 2009-10-31 12:10:28 +0000
@@ -88,7 +88,7 @@
88 self.context = context88 self.context = context
89 self.request = request89 self.request = request
90 form = self.request.form90 form = self.request.form
91 self.language_search = form.get('language_search')91 self.language_search = form.get('find')
92 self.search_requested = self.language_search is not None92 self.search_requested = self.language_search is not None
9393
94 @cachedproperty94 @cachedproperty
9595
=== modified file 'lib/lp/translations/stories/standalone/xx-language.txt'
--- lib/lp/translations/stories/standalone/xx-language.txt 2009-09-16 02:35:32 +0000
+++ lib/lp/translations/stories/standalone/xx-language.txt 2009-10-31 12:10:28 +0000
@@ -76,11 +76,11 @@
76 >>> print browser.url76 >>> print browser.url
77 http://translations.launchpad.dev/+languages77 http://translations.launchpad.dev/+languages
7878
79 >>> text_search = browser.getControl(name='language_search')79 >>> text_search = browser.getControl(name='find')
80 >>> text_search.value = 'Spanish'80 >>> text_search.value = 'Spanish'
81 >>> browser.getControl('Find language', index=0).click()81 >>> browser.getControl('Find language', index=0).click()
82 >>> print browser.url82 >>> print browser.url
83 http://translations.launchpad.dev/+languages/+index83 http://translations.launchpad.dev/+languages/+index?find=Spanish
8484
85And following one of the found languages, we can see a brief information85And following one of the found languages, we can see a brief information
86about the selected language.86about the selected language.
8787
=== modified file 'lib/lp/translations/templates/languageset-index.pt'
--- lib/lp/translations/templates/languageset-index.pt 2009-09-17 14:45:59 +0000
+++ lib/lp/translations/templates/languageset-index.pt 2009-10-31 12:10:28 +0000
@@ -27,13 +27,13 @@
2727
28 <div class="portlet">28 <div class="portlet">
29 <h2>Find a language in Launchpad</h2>29 <h2>Find a language in Launchpad</h2>
30 <form method="post">30 <form method="get">
31 <p>31 <p>
32 <label for="language_search">32 <label for="find">
33 Language name/code contains:33 Language name/code contains:
34 </label>34 </label>
35 <input35 <input
36 name="language_search" size="30"36 name="find" size="30"
37 tal:attributes="value view/language_search" />37 tal:attributes="value view/language_search" />
38 <input38 <input
39 type="submit"39 type="submit"