27 |
description="If the Uninted States is one of the countries, select the states that will be involved in this action"), |
description="If the Uninted States is one of the countries, select the states that will be involved in this action"), |
28 |
vocabulary='getUSStates', |
vocabulary='getUSStates', |
29 |
), |
), |
30 |
LinesField('usGroup', |
LinesField('positions', |
31 |
widget=MultiSelectionWidget(label='Participating US Groups', |
widget=MultiSelectionWidget(label='Positions', |
32 |
description="If the Uninted States is one of the countries, select the political groups that will be involved"), |
description="Select the positions to be added to the list."), |
33 |
vocabulary='getUSGroups', |
vocabulary='getPositions', |
34 |
), |
), |
35 |
StringField('currentOffice', |
LinesField('committees', |
36 |
widget=StringWidget(label='Current Office', |
widget=MultiSelectionWidget(label='Committees', |
37 |
description="To restrict this action to a perticular office or position."), |
description="Select committees to be added to the list."), |
38 |
|
vocabulary='getCommittees', |
39 |
), |
), |
40 |
StringField('keywords', |
StringField('keywords', |
41 |
widget=StringWidget(label='Keywords', |
widget=StringWidget(label='Keywords', |
88 |
|
|
89 |
return result |
return result |
90 |
|
|
91 |
def getUSGroups(self): |
def getPositions(self): |
92 |
res = DisplayList() |
res = DisplayList() |
93 |
|
|
94 |
occupations = self.portal_catalog.uniqueValuesFor('getCurrentPosition') |
occupations = self.portal_catalog.uniqueValuesFor('getCurrentPosition') |
96 |
for i in occupations: |
for i in occupations: |
97 |
res.add(i, i) |
res.add(i, i) |
98 |
|
|
|
# <select name="author:list" size="6" multiple> |
|
|
# <option |
|
99 |
# tal:repeat="item python:here.NewsCatalog.uniqueValuesFor('author')" |
# tal:repeat="item python:here.NewsCatalog.uniqueValuesFor('author')" |
100 |
# tal:content="item" |
# tal:content="item" |
101 |
# value="opt value"> |
# value="opt value"> |
|
# </option> |
|
|
# </select> |
|
102 |
|
|
103 |
return res |
return res |
104 |
|
|
105 |
|
def getCommittees(self): |
106 |
|
res = DisplayList() |
107 |
|
|
108 |
|
return DisplayList(( |
109 |
|
('Committee1', 'Committee 1'), |
110 |
|
('Committee2', 'Committee 2'), |
111 |
|
)) |
112 |
|
|
113 |
|
|
114 |
|
|
115 |
registerType(ActionRecipientList) |
registerType(ActionRecipientList) |