[TASK] adapt action in user detail view schnupperant or scheckbuch
Some checks failed
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
Marie Birner 2025-05-03 17:19:51 +02:00
parent f9a53a703b
commit 149b6afbf5

View File

@ -157,13 +157,15 @@
{{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index, allowed_to_edit=false) }} {{ log::show_old(log=log, state="completed", only_ones=false, index=loop.index, allowed_to_edit=false) }}
{% endfor %} {% endfor %}
</div> </div>
{% if allowed_to_edit %}
<button type="button"
onclick="document.getElementById('call-for-action').showModal()"
class="btn btn-primary">Zu Vereinsmitglied umwandeln</button>
{% endif %}
</div> </div>
<dialog id="call-for-action" {% endif %}
{% if "Scheckbuch" in member or "Schnupperant" in member %}
<div class="grid gap-3 pb-3 mt-3">
<button type="button"
onclick="document.getElementById('call-for-action').showModal()"
class="btn btn-primary">Zu Vereinsmitglied umwandeln</button>
</div>
<dialog id="call-for-action"
class="max-w-screen-sm w-full dark:bg-primary-600 dark:text-white rounded-md" class="max-w-screen-sm w-full dark:bg-primary-600 dark:text-white rounded-md"
onclick="document.getElementById('call-for-action').close()"> onclick="document.getElementById('call-for-action').close()">
<div onclick="event.stopPropagation();" class="p-3"> <div onclick="event.stopPropagation();" class="p-3">
@ -180,7 +182,13 @@
</svg> </svg>
</button> </button>
<div class="mt-8"> <div class="mt-8">
<form action="/admin/user/{{ user.id }}/scheckbook-to-regular" {% if "Scheckbuch" in member %}
{% set action = 'scheckbook-to-regular' %}
{% elif "Schnupperant" in member %}
{% set action = 'schnupperant-to-regular' %}
{% endif %}
<form action="/admin/user/{{ user.id }}/{{ action }}"
method="post" method="post"
enctype="multipart/form-data" enctype="multipart/form-data"
class="grid gap-3"> class="grid gap-3">
@ -205,7 +213,7 @@
</div> </div>
</dialog> </dialog>
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% if is_clubmember %} {% if is_clubmember %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"> <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5">