Merge lp:~cjohnston/launchpad/1260760-unset-source into lp:launchpad

Proposed by Chris Johnston on 2014-08-04
Status: Rejected
Rejected by: William Grant on 2014-11-24
Proposed branch: lp:~cjohnston/launchpad/1260760-unset-source
Merge into: lp:launchpad
Diff against target: 28 lines (+4/-3)
1 file modified
lib/lp/app/widgets/popup.py (+4/-3)
To merge this branch: bzr merge lp:~cjohnston/launchpad/1260760-unset-source
Reviewer Review Type Date Requested Status
Launchpad code reviewers 2014-08-04 Pending
Review via email: mp+229462@code.launchpad.net

Commit Message

Use self.name for 'name' and self.input_id for 'id' when generating inputField in VocabularyPickerWidget.

To post a comment you must log in.

Unmerged revisions

17142. By Chris Johnston on 2014-08-04

Split name and id for VocabularyPickerWidget in order for Zope to be able to access the name

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/app/widgets/popup.py'
2--- lib/lp/app/widgets/popup.py 2013-04-10 08:01:20 +0000
3+++ lib/lp/app/widgets/popup.py 2014-08-04 15:23:15 +0000
4@@ -1,4 +1,4 @@
5-# Copyright 2009 Canonical Ltd. This software is licensed under the
6+# Copyright 2009-2014 Canonical Ltd. This software is licensed under the
7 # GNU Affero General Public License version 3 (see the file LICENSE).
8
9 """Single selection widget using a popup to select one item from many."""
10@@ -93,7 +93,8 @@
11 def inputField(self):
12 d = {
13 'formToken': self.formToken,
14- 'name': self.input_id,
15+ 'id': self.input_id,
16+ 'name': self.name,
17 'displayWidth': self.displayWidth,
18 'displayMaxWidth': self.displayMaxWidth,
19 'onKeyPress': self.onKeyPress,
20@@ -101,7 +102,7 @@
21 'cssClass': self.cssClass,
22 }
23 return structured(
24- """<input type="text" value="%(formToken)s" id="%(name)s"
25+ """<input type="text" value="%(formToken)s" id="%(id)s"
26 name="%(name)s" size="%(displayWidth)s"
27 maxlength="%(displayMaxWidth)s"
28 onKeyPress="%(onKeyPress)s" style="%(style)s"