~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/app/widgets/popup.py

[r=jcsackett][bug=801388] Ensure the person picker only shows "assign
        me" and "remove assignee" links when required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    __call__ = ViewPageTemplateFile('templates/form-picker.pt')
29
29
 
30
30
    picker_type = 'default'
 
31
    # Provide default values for the following properties in case someone
 
32
    # creates a vocab picker for a person instead if using the derived
 
33
    # PersonPicker.
 
34
    show_assign_me_button = False
 
35
    show_remove_button = False
31
36
 
32
37
    popup_name = 'popup-vocabulary-picker'
33
38
 
159
164
class PersonPickerWidget(VocabularyPickerWidget):
160
165
 
161
166
    include_create_team_link = False
 
167
    show_assign_me_button = True
 
168
    show_remove_button = True
162
169
 
163
170
    @property
164
171
    def picker_type(self):