# 456 Rework API key creation

* removes frontend input field holding generated API key
* replaces with modal form
* reworks tests on API token form
This commit is contained in:
2025-01-08 16:03:26 +01:00
parent 123a470006
commit 9b63307f01
11 changed files with 214 additions and 389 deletions

View File

@@ -8,7 +8,16 @@
<table class="table table-hover">
<tr>
<th scope="row">{% trans 'Current token' %}</th>
<td>{{ user.api_token.token }}</td>
<td>
<div class="row">
<div class="col-10">{{ user.api_token.token }}</div>
<div class="col-2">
<button class="btn btn-default btn-modal" data-form-url="{% url 'user:api-token-new' %}" title="{% trans 'Create new token' %}">
{% fa5_icon 'dice' %}
</button>
</div>
</div>
</td>
</tr>
<tr>
<th scope="row">{% trans 'Authenticated by admins' %}</th>
@@ -27,7 +36,9 @@
</table>
</div>
</div>
<hr>
{% include 'form/table/generic_table_form.html' %}
{% with 'btn-modal' as btn_class %}
{% include 'modal/modal_form_script.html' %}
{% endwith %}
{% endblock %}