admin: add use spinner button for admin lists

This commit is contained in:
Jens Langhammer 2020-11-29 18:46:45 +01:00
parent a8dad2e393
commit 902953a2c7
23 changed files with 129 additions and 136 deletions

View File

@ -21,9 +21,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:application-create' %}"> <pb-modal-button href="{% url 'passbook_admin:application-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -69,15 +69,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:application-update' pk=application.pk %}"> <pb-modal-button href="{% url 'passbook_admin:application-update' pk=application.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:application-delete' pk=application.pk %}"> <pb-modal-button href="{% url 'passbook_admin:application-delete' pk=application.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -108,9 +108,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:application-create' %}"> <pb-modal-button href="{% url 'passbook_admin:application-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -21,9 +21,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}"> <pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -64,15 +64,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-update' pk=kp.pk %}"> <pb-modal-button href="{% url 'passbook_admin:certificatekeypair-update' pk=kp.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-delete' pk=kp.pk %}"> <pb-modal-button href="{% url 'passbook_admin:certificatekeypair-delete' pk=kp.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -103,9 +103,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}"> <pb-modal-button href="{% url 'passbook_admin:certificatekeypair-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -21,15 +21,15 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}"> <pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}"> <pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Import' %} {% trans 'Import' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -75,15 +75,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:flow-update' pk=flow.pk %}"> <pb-modal-button href="{% url 'passbook_admin:flow-update' pk=flow.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:flow-delete' pk=flow.pk %}"> <pb-modal-button href="{% url 'passbook_admin:flow-delete' pk=flow.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a> <a class="pf-c-button pf-m-secondary pb-root-link" href="{% url 'passbook_admin:flow-execute' pk=flow.pk %}?next={{ request.get_full_path }}">{% trans 'Execute' %}</a>
@ -116,15 +116,15 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:flow-create' %}"> <pb-modal-button href="{% url 'passbook_admin:flow-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:flow-import' %}"> <pb-modal-button href="{% url 'passbook_admin:flow-import' %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Import' %} {% trans 'Import' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -21,9 +21,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:group-create' %}"> <pb-modal-button href="{% url 'passbook_admin:group-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -62,15 +62,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:group-update' pk=group.pk %}"> <pb-modal-button href="{% url 'passbook_admin:group-update' pk=group.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:group-delete' pk=group.pk %}"> <pb-modal-button href="{% url 'passbook_admin:group-delete' pk=group.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -101,9 +101,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:group-create' %}"> <pb-modal-button href="{% url 'passbook_admin:group-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -23,9 +23,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:outpost-create' %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -93,15 +93,15 @@
{% endwith %} {% endwith %}
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:outpost-update' pk=outpost.pk %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-update' pk=outpost.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:outpost-delete' pk=outpost.pk %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-delete' pk=outpost.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% get_htmls outpost as htmls %} {% get_htmls outpost as htmls %}
@ -136,9 +136,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:outpost-create' %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-c-button pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -87,15 +87,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-update' pk=sc.pk %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-update' pk=sc.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-delete' pk=sc.pk %}"> <pb-modal-button href="{% url 'passbook_admin:outpost-service-connection-delete' pk=sc.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>

View File

@ -75,21 +75,21 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:policy-update' pk=policy.pk %}"> <pb-modal-button href="{% url 'passbook_admin:policy-update' pk=policy.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:policy-test' pk=policy.pk %}"> <pb-modal-button href="{% url 'passbook_admin:policy-test' pk=policy.pk %}">
<button slot="trigger" class="pf-c-button pf-m-tertiary"> <pb-spinner-button slot="trigger" class="pf-m-tertiary">
{% trans 'Test' %} {% trans 'Test' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:policy-delete' pk=policy.pk %}"> <pb-modal-button href="{% url 'passbook_admin:policy-delete' pk=policy.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>

View File

@ -20,9 +20,9 @@
<div class="pf-c-toolbar__content"> <div class="pf-c-toolbar__content">
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}"> <pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -75,15 +75,15 @@
</th> </th>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:policy-binding-update' pk=binding.pk %}"> <pb-modal-button href="{% url 'passbook_admin:policy-binding-update' pk=binding.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:policy-binding-delete' pk=binding.pk %}"> <pb-modal-button href="{% url 'passbook_admin:policy-binding-delete' pk=binding.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -106,9 +106,9 @@
{% trans 'Currently no policy bindings exist. Click the button below to create one.' %} {% trans 'Currently no policy bindings exist. Click the button below to create one.' %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}"> <pb-modal-button href="{% url 'passbook_admin:policy-binding-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -72,15 +72,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:property-mapping-update' pk=property_mapping.pk %}"> <pb-modal-button href="{% url 'passbook_admin:property-mapping-update' pk=property_mapping.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:property-mapping-delete' pk=property_mapping.pk %}"> <pb-modal-button href="{% url 'passbook_admin:property-mapping-delete' pk=property_mapping.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>

View File

@ -84,15 +84,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:provider-update' pk=provider.pk %}"> <pb-modal-button href="{% url 'passbook_admin:provider-update' pk=provider.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:provider-delete' pk=provider.pk %}"> <pb-modal-button href="{% url 'passbook_admin:provider-delete' pk=provider.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% get_links provider as links %} {% get_links provider as links %}

View File

@ -82,15 +82,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:source-update' pk=source.pk %}"> <pb-modal-button href="{% url 'passbook_admin:source-update' pk=source.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:source-delete' pk=source.pk %}"> <pb-modal-button href="{% url 'passbook_admin:source-delete' pk=source.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% get_links source as links %} {% get_links source as links %}

View File

@ -77,15 +77,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:stage-update' pk=stage.stage_uuid %}"> <pb-modal-button href="{% url 'passbook_admin:stage-update' pk=stage.stage_uuid %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:stage-delete' pk=stage.stage_uuid %}"> <pb-modal-button href="{% url 'passbook_admin:stage-delete' pk=stage.stage_uuid %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% get_links stage as links %} {% get_links stage as links %}

View File

@ -20,9 +20,9 @@
<div class="pf-c-toolbar__content"> <div class="pf-c-toolbar__content">
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}"> <pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -81,15 +81,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:stage-binding-update' pk=binding.pk %}"> <pb-modal-button href="{% url 'passbook_admin:stage-binding-update' pk=binding.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Update' %} {% trans 'Update' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:stage-binding-delete' pk=binding.pk %}"> <pb-modal-button href="{% url 'passbook_admin:stage-binding-delete' pk=binding.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -112,9 +112,9 @@
{% trans 'Currently no flow-stage bindings exist. Click the button below to create one.' %} {% trans 'Currently no flow-stage bindings exist. Click the button below to create one.' %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}"> <pb-modal-button href="{% url 'passbook_admin:stage-binding-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -22,9 +22,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}"> <pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -57,9 +57,9 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-delete' pk=invitation.pk %}"> <pb-modal-button href="{% url 'passbook_admin:stage-invitation-delete' pk=invitation.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</td> </td>
@ -90,9 +90,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}"> <pb-modal-button href="{% url 'passbook_admin:stage-invitation-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -22,9 +22,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-create' %}"> <pb-modal-button href="{% url 'passbook_admin:stage-prompt-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -79,15 +79,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-update' pk=prompt.pk %}"> <pb-modal-button href="{% url 'passbook_admin:stage-prompt-update' pk=prompt.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Update' %} {% trans 'Update' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_admin:stage-prompt-delete' pk=prompt.pk %}"> <pb-modal-button href="{% url 'passbook_admin:stage-prompt-delete' pk=prompt.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% get_links prompt as links %} {% get_links prompt as links %}

View File

@ -59,9 +59,9 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:token-delete' pk=token.pk %}"> <pb-modal-button href="{% url 'passbook_admin:token-delete' pk=token.pk %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-token-copy-button identifier="{{ token.identifier }}"> <pb-token-copy-button identifier="{{ token.identifier }}">

View File

@ -20,9 +20,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_admin:user-create' %}"> <pb-modal-button href="{% url 'passbook_admin:user-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<button role="pb-refresh" class="pf-c-button pf-m-primary"> <button role="pb-refresh" class="pf-c-button pf-m-primary">
@ -62,23 +62,23 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_admin:user-update' pk=user.pk %}"> <pb-modal-button href="{% url 'passbook_admin:user-update' pk=user.pk %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% if user.is_active %} {% if user.is_active %}
<pb-modal-button href="{% url 'passbook_admin:user-disable' pk=user.pk %}"> <pb-modal-button href="{% url 'passbook_admin:user-disable' pk=user.pk %}">
<button slot="trigger" class="pf-c-button pf-m-warning"> <pb-spinner-button slot="trigger" class="pf-m-warning">
{% trans 'Disable' %} {% trans 'Disable' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% else %} {% else %}
<pb-modal-button href="{% url 'passbook_admin:user-delete' pk=user.pk %}"> <pb-modal-button href="{% url 'passbook_admin:user-delete' pk=user.pk %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Enable' %} {% trans 'Enable' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
{% endif %} {% endif %}
@ -112,9 +112,9 @@
{% endif %} {% endif %}
</div> </div>
<pb-modal-button href="{% url 'passbook_admin:user-create' %}"> <pb-modal-button href="{% url 'passbook_admin:user-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

View File

@ -4,20 +4,6 @@
{% load passbook_utils %} {% load passbook_utils %}
{% load static %} {% load static %}
{% block head %}
{{ block.super }}
{{ form.media.css }}
<script type="text/javascript" src="{% url 'admin:jsi18n' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/vendor/jquery/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/jquery.init.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/core.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/actions.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/urlify.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/prepopulate.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/SelectBox.js' %}"></script>
<script type="text/javascript" src="{% static 'admin/js/SelectFilter2.js' %}"></script>
{% endblock %}
{% block content %} {% block content %}
<section class="pf-c-page__main-section pf-m-light"> <section class="pf-c-page__main-section pf-m-light">
<div class="pf-c-content"> <div class="pf-c-content">

View File

@ -10,9 +10,9 @@
{% include 'partials/toolbar_search.html' %} {% include 'partials/toolbar_search.html' %}
<div class="pf-c-toolbar__bulk-select"> <div class="pf-c-toolbar__bulk-select">
<pb-modal-button href="{% url 'passbook_core:user-tokens-create' %}"> <pb-modal-button href="{% url 'passbook_core:user-tokens-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>
@ -56,15 +56,15 @@
</td> </td>
<td> <td>
<pb-modal-button href="{% url 'passbook_core:user-tokens-update' identifier=token.identifier %}"> <pb-modal-button href="{% url 'passbook_core:user-tokens-update' identifier=token.identifier %}">
<button slot="trigger" class="pf-c-button pf-m-secondary"> <pb-spinner-button slot="trigger" class="pf-m-secondary">
{% trans 'Edit' %} {% trans 'Edit' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-modal-button href="{% url 'passbook_core:user-tokens-delete' identifier=token.identifier %}"> <pb-modal-button href="{% url 'passbook_core:user-tokens-delete' identifier=token.identifier %}">
<button slot="trigger" class="pf-c-button pf-m-danger"> <pb-spinner-button slot="trigger" class="pf-m-danger">
{% trans 'Delete' %} {% trans 'Delete' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
<pb-token-copy-button identifier="{{ token.identifier }}"> <pb-token-copy-button identifier="{{ token.identifier }}">
@ -89,9 +89,9 @@
{% trans 'Currently no tokens exist. Click the button below to create one.' %} {% trans 'Currently no tokens exist. Click the button below to create one.' %}
</div> </div>
<pb-modal-button href="{% url 'passbook_core:user-tokens-create' %}"> <pb-modal-button href="{% url 'passbook_core:user-tokens-create' %}">
<button slot="trigger" class="pf-c-button pf-m-primary"> <pb-spinner-button slot="trigger" class="pf-m-primary">
{% trans 'Create' %} {% trans 'Create' %}
</button> </pb-spinner-button>
<div slot="modal"></div> <div slot="modal"></div>
</pb-modal-button> </pb-modal-button>
</div> </div>

4
web/dist/main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -21,7 +21,6 @@ export class Config {
integrations: [new Integrations.BrowserTracing()], integrations: [new Integrations.BrowserTracing()],
tracesSampleRate: 1.0, tracesSampleRate: 1.0,
environment: config.error_reporting_environment, environment: config.error_reporting_environment,
sendDefaultPii: config.error_reporting_send_pii,
}); });
console.debug(`passbook/config: Sentry enabled.`); console.debug(`passbook/config: Sentry enabled.`);
} }

View File

@ -16,6 +16,9 @@ export class SpinnerButton extends LitElement {
@property() @property()
isRunning = false; isRunning = false;
@property()
form?: string;
static get styles() { static get styles() {
return [ return [
GlobalsStyle, GlobalsStyle,
@ -57,6 +60,11 @@ export class SpinnerButton extends LitElement {
if (this.isRunning === true) { if (this.isRunning === true) {
return; return;
} }
if (this.form) {
// Because safari we can't just extend HTMLButtonElement, hence I have to implement
// these attributes by myself here, sigh...
document.querySelector<HTMLFormElement>(`#${this.form}`)?.submit();
}
this.setLoading(); this.setLoading();
} }