{% load i18n admin_urls jazzmin %}
{% get_jazzmin_ui_tweaks as jazzmin_ui %}

{% block submit-row %}
<div class="d-flex flex-wrap gap-2 align-items-center">
    {% if show_save %}
        <input type="submit" value="{% trans 'Save' %}" class="btn btn-sm {{ jazzmin_ui.button_classes.success }}" name="_save">
    {% endif %}
    {% if show_save_as_new %}
        <input type="submit" class="btn btn-sm {{ jazzmin_ui.button_classes.info }}" value="{% trans 'Save as new' %}" name="_saveasnew">
    {% endif %}
    {% if show_save_and_add_another %}
        <input type="submit" class="btn btn-sm {{ jazzmin_ui.button_classes.info }}" value="{% trans 'Save and add another' %}" name="_addanother">
    {% endif %}
    {% if show_save_and_continue %}
        <input type="submit" class="btn btn-sm {{ jazzmin_ui.button_classes.info }}" value="{% if can_change %}{% trans 'Save and continue editing' %}{% else %}{% trans 'Save and view' %}{% endif %}" name="_continue">
    {% endif %}
    {% if show_close %}
        <a href="{% url opts|admin_urlname:'changelist' %}" class="btn btn-sm {{ jazzmin_ui.button_classes.secondary }}">{% trans 'Close' %}</a>
    {% endif %}
    {% if show_delete_link and original %}
        {% url opts|admin_urlname:'delete' original.pk|admin_urlquote as delete_url %}
        <a href="{% add_preserved_filters delete_url %}" class="btn btn-sm {{ jazzmin_ui.button_classes.danger }}">{% trans "Delete" %}</a>
    {% endif %}

    {% block extra-actions %}{% endblock %}

</div>
{% endblock %}

