mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #13962: Add a copy-to-clipboard button to the key field of the API token creation form
This commit is contained in:
@ -29,6 +29,14 @@
|
||||
{{ label }}
|
||||
</label>
|
||||
</div>
|
||||
{# Include a copy-to-clipboard button #}
|
||||
{% elif 'data-clipboard' in field.field.widget.attrs %}
|
||||
<div class="input-group">
|
||||
{{ field }}
|
||||
<button type="button" title="{% trans "Copy to clipboard" %}" class="btn btn-outline-dark border-input copy-content" data-clipboard-target="#{{ field.id_for_label }}">
|
||||
<i class="mdi mdi-content-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
{# Default field rendering #}
|
||||
{% else %}
|
||||
{{ field }}
|
||||
|
Reference in New Issue
Block a user