Fix styling of change confirmation

main
Thu Trang Pham 2020-10-31 19:44:46 -07:00
parent 9d007df017
commit 3f8961478a
1 changed files with 10 additions and 6 deletions

View File

@ -7,6 +7,8 @@
<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" %}">{% endblock %}
{% block bodyclass %}{{ block.super }} app-{{ opts.app_label }} model-{{ opts.model_name }} change-confirmation{% endblock %}
{% block breadcrumbs %}
@ -14,22 +16,24 @@
<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>
&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|truncatewords:"18" }}</a>
&rsaquo; <a href="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{{ new_object|truncatewords:"18" }}</a>
&rsaquo; {% trans 'Change Confirmation' %}
</div>
{% endblock %}
{% block content %}
<p>{% blocktrans with escaped_object=object %}Are you sure you want to change the {{ object_name }} "{{ escaped_object }}"?{% endblocktrans %}</p>
<p>{% blocktrans with escaped_object=object %}Are you sure you want to change the {{ model_name }} "{{ object_name }}"?{% endblocktrans %}</p>
<form method="post" action="{% url opts|admin_urlname:'change' object_id|admin_urlquote %}">{% csrf_token %}
<div>
{% for key, value in form_data.items %}
<input type="hidden" name="{{ key }}" value="{{ value }}">
{% endfor %}
{% 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 %}
<input type="submit" value="{% trans 'Yes, Im sure' %}" name="{{ submit_name }}">
<a href="#" class="button cancel-link">{% trans "No, continue to edit" %}</a>
{% 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 }}">
<a href="#" class="button closelink">{% trans "No, continue to edit" %}</a>
</div>
</div>
</form>
{% endblock %}