Skip to content

Commit

Permalink
Pass with_forms to leaflet_draw_i18n template (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchainz authored Oct 14, 2024
1 parent 8efe275 commit 0c13b9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions leaflet/templatetags/leaflet_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ def leaflet_map(name, callback=None, fitextent=True, creatediv=True,
}


@register.inclusion_tag('leaflet/leaflet_draw_i18n.html')
def leaflet_draw_i18n():
@register.inclusion_tag('leaflet/leaflet_draw_i18n.html', takes_context=True)
def leaflet_draw_i18n(context):
return {
"Control_ResetView_TITLE": _("Reset view"),
# with_forms
"with_forms": context.get("with_forms", False),
"draw_toolbar_actions_title": _("Cancel drawing"),
"draw_toolbar_actions_text": _("Cancel"),
"draw_toolbar_undo_title": _("Delete last point drawn"),
Expand Down

0 comments on commit 0c13b9d

Please sign in to comment.