Files
django-admin-confirm-briq/admin_confirm/templates/admin/change_confirmation.html
T
Thu Trang Pham cc36492bfe fix(ISSUE-8): try using admin form (#16)
* Remove casting to list in _get_form_data

* feat(ISSUE-8): Use Django's form and hide with css

* feat(ISSUE-8): Updated dev release on testpypi

Co-authored-by: Thu Trang Pham <thu@joinmodernhealth.com>
2021-02-26 09:56:57 -08:00

58 lines
2.3 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends "admin/base_site.html" %}
{% load i18n admin_urls static %}
{% block extrahead %}
{{ block.super }}
{{ media }}
<script src="{% static 'admin/js/cancel.js' %}" async></script>
{% endblock %}
{% block extrastyle %}
{{ block.super }}
<link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "admin/css/confirmation.css" %}">
{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-confirmation{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
<a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
&rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ opts.app_config.verbose_name }}</a>
{% if not add %}
&rsaquo; <a href="{% url opts|admin_urlname:'changelist' %}">{{ opts.verbose_name_plural|capfirst }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{{ object_name|truncatewords:"18" }}</a>
&rsaquo; {% trans 'Confirm change' %}
{% else %}
&rsaquo; {% trans 'Confirm add' %}
{% endif %}
</div>
{% endblock %}
{% block content %}
{% if add %}
<p>{% blocktrans with escaped_object=object %}Are you sure you want to add the {{ model_name }}?{% endblocktrans %}</p>
{% include "admin/change_data.html" %}
<form method="post" action="{% url opts|admin_urlname:'add'%}">{% csrf_token %}
{% else %}
<p>{% blocktrans with escaped_object=object %}Are you sure you want to change the {{ model_name }} "{{ object_name }}"?{% endblocktrans %}</p>
{% include "admin/change_data.html" %}
<form method="post" action="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{% csrf_token %}
{% endif %}
<div class=hidden>
{{ form }}
</div>
{% if is_popup %}<input type="hidden" name="{{ is_popup_var }}" value="1">{% endif %}
{% if to_field %}<input type="hidden" name="{{ to_field_var }}" value="{{ to_field }}">{% endif %}
<div class="submit-row">
<input type="submit" value="{% trans 'Yes, Im sure' %}" name="{{ submit_name }}">
<p class="deletelink-box">
<a href="#" class="button cancel-link">{% trans "No, continue to edit" %}</a>
</p>
</div>
</form>
{% endblock %}