{% extends "admin/change_form.html" %}
{% load i18n static cms_admin %}

{% block form_top %}
  {{ block.super }}
  {% if request.GET.cms_path %}
    <input type="hidden" name="cms_path" value="{{ request.GET.cms_path }}">
    <input type="hidden" name="_cms_modal" value="1">
  {% endif %}
{% endblock %}

{% block after_related_objects %}
  {{ block.super }}
{% if add %}
    <div class="submit-row"{% if is_popup %} style="overflow: auto;"{% endif %}>
        <input type="submit" name="_save" class="default" value="{% trans 'Save' %}" {{ onclick_attrib }}/>
        <input type="submit" name="_continue" value="{% trans 'Save and continue editing' %}" {{ onclick_attrib }}/>
    </div>
{% else %}
    {% page_submit_row %}
{% endif %}
{% endblock %}

{# Keep it for now #}
{#{% if not is_popup %}#}
{#{% block submit_buttons_top %}{% page_submit_row %}{% endblock %}#}
{#{% block submit_buttons_bottom %}{% page_submit_row %}{% endblock %}#}
{#{% endif %}#}
