feat: Allow toggling ongoing communication status
This commit is contained in:
@@ -71,7 +71,22 @@
|
|||||||
value="{{ rescue_org.pk }}">
|
value="{{ rescue_org.pk }}">
|
||||||
<input type="hidden" name="action" value="checked">
|
<input type="hidden" name="action" value="checked">
|
||||||
<button class="" type="submit">{% translate "Organisation geprüft" %}</button>
|
<button class="" type="submit">{% translate "Organisation geprüft" %}</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer-item is-warning">
|
||||||
|
<form method="post">
|
||||||
|
{% csrf_token %}
|
||||||
|
<input type="hidden"
|
||||||
|
name="rescue_organization_id"
|
||||||
|
value="{{ rescue_org.pk }}">
|
||||||
|
<input type="hidden" name="action" value="toggle_active_communication">
|
||||||
|
<button class="" type="submit">
|
||||||
|
{% if rescue_org.ongoing_communication %}
|
||||||
|
{% translate "Aktive Kommunikation beendet" %}
|
||||||
|
{% else %}
|
||||||
|
{% translate "Aktive Kommunikation" %}
|
||||||
|
{% endif %}
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer-item is-danger">
|
<div class="card-footer-item is-danger">
|
||||||
|
|||||||
@@ -867,6 +867,9 @@ def rescue_organization_check(request, context=None):
|
|||||||
if action == "checked":
|
if action == "checked":
|
||||||
rescue_org.set_checked()
|
rescue_org.set_checked()
|
||||||
Log.objects.create(user=request.user, action="rescue_organization_checked", )
|
Log.objects.create(user=request.user, action="rescue_organization_checked", )
|
||||||
|
elif action == "toggle_active_communication":
|
||||||
|
rescue_org.ongoing_communication = not rescue_org.ongoing_communication
|
||||||
|
rescue_org.save()
|
||||||
elif action == "set_species_url":
|
elif action == "set_species_url":
|
||||||
species_url_form = SpeciesURLForm(request.POST)
|
species_url_form = SpeciesURLForm(request.POST)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user