Test out copy functionality

This commit is contained in:
Rebecca Hsieh 2024-07-17 10:50:01 -07:00
parent 87b0b6c358
commit b421430024
No known key found for this signature in database
2 changed files with 13 additions and 1 deletions

View file

@ -1,4 +1,5 @@
{% extends "admin/change_form.html" %}
{% load static i18n %} <!-- Add this line to load static template tag -->
{% comment %} Replace the Django ul markup with a div. We'll edit the child markup accordingly in change_form_object_tools {% endcomment %}
{% block object-tools %}
@ -10,3 +11,7 @@
</div>
{% endif %}
{% endblock %}
{% block extrahead %}
<script type="application/javascript" src="{% static 'js/copy-summary.js' %}" defer></script>
{% endblock %}

View file

@ -16,5 +16,12 @@
<p class="margin-0 padding-0">
<a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "History" %}</a>
</p>
{% if opts.model_name == 'domainrequest' %}
<p class="margin-0 padding-0">
<button id="copy-summary-btn" class="button">{% translate "Copy request summary" %}</button>
<!-- <a href="{% add_preserved_filters history_url %}" class="historylink">{% translate "Copy request summary" %}</a> -->
</p>
{% endif %}
{% endif %}
{% endblock %}
{% endblock %}