diff options
| -rw-r--r-- | chimere/templates/chimere/blocks/polygon_edit.html | 4 | ||||
| -rw-r--r-- | chimere/widgets.py | 5 | 
2 files changed, 5 insertions, 4 deletions
| diff --git a/chimere/templates/chimere/blocks/polygon_edit.html b/chimere/templates/chimere/blocks/polygon_edit.html index 5e08e5a..929ac9d 100644 --- a/chimere/templates/chimere/blocks/polygon_edit.html +++ b/chimere/templates/chimere/blocks/polygon_edit.html @@ -7,10 +7,10 @@    var CENTER_LONLAT = centerLonLat = ol.proj.transform(          {center}, epsg_display_projection, epsg_projection);    var DEFAULT_ZOOM = {zoom}; -  {{extra_js|safe}} +  {extra_js}    var chimere_init_options = {% raw %}{{}}{% endraw %};    chimere_init_options["input_id"] = 'id_{{name}}'; -  {% if map_layers %}chimere_init_options["map_layers"] = [{map_layers}];{% endif %} +  chimere_init_options["map_layers"] = [{map_layers}];    chimere_init_options['dynamic_categories'] = false;    chimere_init_options['edition'] = true;    chimere_init_options['edition_type'] = 'polygon'; diff --git a/chimere/widgets.py b/chimere/widgets.py index 7d92684..2a8bc5d 100644 --- a/chimere/widgets.py +++ b/chimere/widgets.py @@ -658,7 +658,7 @@ class PolygonChooserWidget(forms.TextInput):              {'name': name, 'val': val, 'initialized': initialized,               'isvalue': bool(value),               'default_area': "true" if default_area else "false", -             'value': value, 'extra_js': u"\n".join(extra_js), +             'value': value               }          )          return mark_safe(tpl.format( @@ -667,7 +667,8 @@ class PolygonChooserWidget(forms.TextInput):              projection=settings.CHIMERE_EPSG_PROJECTION,              center=list(settings.CHIMERE_DEFAULT_CENTER),              zoom=zoom, -            map_layers=", ".join(map_layers) +            map_layers=u", ".join(map_layers), +            extra_js=u"\n".join(extra_js),          )) | 
