equal
deleted
inserted
replaced
297 def vocabulary(self, form): |
297 def vocabulary(self, form): |
298 entity = form.edited_entity |
298 entity = form.edited_entity |
299 _ = form.req._ |
299 _ = form.req._ |
300 if entity.has_eid(): |
300 if entity.has_eid(): |
301 return [(_(entity.pkey), entity.pkey)] |
301 return [(_(entity.pkey), entity.pkey)] |
302 # key beginning with 'system.' should usually not be edited by hand |
|
303 choices = entity.vreg.user_property_keys() |
302 choices = entity.vreg.user_property_keys() |
304 return [(u'', u'')] + sorted(zip((_(v) for v in choices), choices)) |
303 return [(u'', u'')] + sorted(zip((_(v) for v in choices), choices)) |
305 |
304 |
306 |
305 |
307 class PropertyValueField(StringField): |
306 class PropertyValueField(StringField): |
308 """specific field for CWProperty.value which will be different according to |
307 """specific field for CWProperty.value which will be different according to |
309 the selected key type and vocabulary information |
308 the selected key type and vocabulary information |
310 """ |
309 """ |
311 widget = PlaceHolderWidget |
310 widget = PlaceHolderWidget |