Back to Wagtail

Chooser

wagtail/admin/templates/wagtailadmin/widgets/chooser.html

7.41.1 KB
Original Source

{% load wagtailadmin_tags i18n %} {% comment %} Either the chosen or unchosen div will be shown, depending on the presence of the 'blank' class on the container. {% endcomment %} {% fragment as title_id %}{{ attrs.id }}-title{% endfragment %}

{% block chosen_icon %} {% if icon %}{% icon name=icon classname="default" %}{% endif %} {% endblock chosen_icon %} {% block chosen_state_view %} {{ display_title }} {% endblock %} {% dropdown toggle_icon="dots-horizontal" toggle_aria_label=_("Actions") toggle_describedby=title_id hide_on_click=True %} {% icon name="resubmit" %} {{ widget.choose_another_text }} {% if widget.show_edit_link %} {% block edit_link %} {% icon name="edit" %} {{ widget.link_to_chosen_text }} {% endblock %} {% endif %} {% if not widget.is_required and widget.show_clear_link %} {% icon name="bin" %} {{ widget.clear_choice_text }} {% endif %} {% enddropdown %}

{% block unchosen_icon %}{% icon name=icon|default:"plus-inverse" %}{% endblock unchosen_icon %} {{ widget.choose_one_text }}

{{ original_field_html }}