WIP for new copy fields

This commit is contained in:
zandercymatics 2024-03-20 15:10:08 -06:00
parent e7edf19897
commit 438df069d6
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
2 changed files with 37 additions and 6 deletions

View file

@ -17,11 +17,28 @@
<tr>
<th class="padding-left-0" scope="row">Email</th>
{% if user.email or user.contact.email %}
{% if user.contact.email %}
<td>{{ user.contact.email }}</td>
{% else %}
<td>{{ user.email }}</td>
{% endif %}
<td>
<span>
{% if user.contact.email %}
{{ user.contact.email }}
<input type="hidden" value="{{ user.contact.email }}" id="id_email">
{% else %}
{{ user.email }}
<input type="hidden" value="{{ user.email }}">
{% endif %}
<button
class="usa-button usa-button--unstyled padding-left-2 usa-button__icon usa-button__clipboard"
type="button"
>
<svg
class="usa-icon"
>
<use aria-hidden="true" xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
</svg>
</button>
</span>
</td>
{% else %}
<td>Nothing found</td>
{% endif %}

View file

@ -62,7 +62,21 @@ This is using a custom implementation fieldset.html (see admin/fieldset.html)
<tr data-contact-id="{{ contact.id }}" data-contact-url="{% url 'admin:registrar_contact_change' contact.id %}">
<th scope="row">{{contact.first_name}} {{contact.last_name}}</th>
<td>{{ contact.title }}</td>
<td>{{ contact.email }}</td>
<td>
<input type="hidden" value="{{ contact.email }}">
<button
class="usa-button usa-button--unstyled usa-button__icon usa-button__clipboard"
type="button"
>
<svg
class="usa-icon"
>
<use aria-hidden="true" xlink:href="{%static 'img/sprite.svg'%}#content_copy"></use>
</svg>
</button>
{{ contact.email }}
</td>
<td>{{ contact.phone }}</td>
</tr>
{% endfor %}