{% load i18n %}<!DOCTYPE html>
<html>
    <head><title>{% trans 'Popup closing...' %}</title></head>
    <body>
        <script type="text/javascript">
            {% if action == 'change' %}
                opener.dismissChangeRelatedObjectPopup(window, "{{ value|escapejs }}", "{{ obj|escapejs }}", "{{ new_value|escapejs }}");
            {% elif action == 'delete' %}
                opener.dismissDeleteRelatedObjectPopup(window, "{{ value|escapejs }}");
            {% else %}
                opener.dismissAddRelatedObjectPopup(window, "{{ value|escapejs }}", "{{ obj|escapejs }}");
            {% endif %}
        </script>
    </body>
</html>
