{% extends "admin/change_form.html" %} {% load i18n %} {% comment %} xstate-statemachine: transition buttons for StatechartAdminMixin. Each button is its own POST form with a CSRF token, rendered AFTER the admin's change form (forms cannot nest). Override the blocks `xsm_badge` / `xsm_transitions` to restyle; no JavaScript is needed. {% endcomment %} {% block content %} {{ block.super }} {% if original and xsm_transition_url %}
{% block xsm_badge %}

{% translate "Statechart" %}: {{ original.state|default:"-" }}

{% endblock %} {% block xsm_transitions %} {% if xsm_buttons %}
{% for b in xsm_buttons %}
{% csrf_token %}
{% endfor %}
{% else %}

{% translate "No transitions are available to you in this state." %}

{% endif %} {% endblock %}
{% endif %} {% endblock %}