| Revision 44,
645 bytes
checked in by takanori, 6 years ago
(diff) |
|
add latlng field, widget, validator
|
| Line | |
|---|
| 1 | from Globals import InitializeClass |
|---|
| 2 | from AccessControl import ClassSecurityInfo |
|---|
| 3 | from Products.Archetypes.public import StringWidget |
|---|
| 4 | from Products.Archetypes.Registry import registerWidget |
|---|
| 5 | |
|---|
| 6 | class LatLngWidget(StringWidget): |
|---|
| 7 | _properties = StringWidget._properties.copy() |
|---|
| 8 | _properties.update({ |
|---|
| 9 | 'macro' : "latlng_widget", |
|---|
| 10 | }) |
|---|
| 11 | security = ClassSecurityInfo() |
|---|
| 12 | |
|---|
| 13 | InitializeClass(LatLngWidget) |
|---|
| 14 | |
|---|
| 15 | registerWidget(LatLngWidget, |
|---|
| 16 | title='LatLng', |
|---|
| 17 | description="Renders latitude and longitude fields.", |
|---|
| 18 | used_for=('Products.ATGoogleMaps.field.LatLngField',) |
|---|
| 19 | ) |
|---|
Note: See
TracBrowser
for help on using the repository browser.