1
0
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:
Jeremy Stretch
2023-10-13 16:39:19 -04:00
parent 7983c2590e
commit 51ef4fb920
6 changed files with 14 additions and 8 deletions

View File

@ -114,6 +114,9 @@ class UserTokenForm(BootstrapMixin, forms.ModelForm):
help_text=_(
'Keys must be at least 40 characters in length. <strong>Be sure to record your key</strong> prior to '
'submitting this form, as it may no longer be accessible once the token has been created.'
),
widget=forms.TextInput(
attrs={'data-clipboard': 'true'}
)
)
allowed_ips = SimpleArrayField(