Skip to content

Commit

Permalink
Fixes monim67#119 - Set the addon_icon_class context on the widget key
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed May 14, 2024
1 parent a3be637 commit 9de5a3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap_datepicker_plus/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def get_context(
"""Return widget context dictionary."""
settings = get_widget_settings()
context = super().get_context(name, value, attrs)
context["addon_icon_class"] = settings.addon_icon_classes[self.variant]
context["widget"]["addon_icon_class"] = settings.addon_icon_classes[self.variant]
return context

@deprecated(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="input-group dbdp">
{% include 'django/forms/widgets/text.html' %}
<div class="input-group-addon input-group-append input-group-text">
<i class="{{ addon_icon_class }}"></i>
<i class="{{ widget.addon_icon_class }}"></i>
</div>
</div>
{% if "data-dbdp-debug" in widget.attrs %}
Expand Down

0 comments on commit 9de5a3d

Please sign in to comment.