fix: fix rendering of adoption notice edit form

This commit is contained in:
2025-06-18 14:59:35 +02:00
parent 3a6ce1d38b
commit 61deb96961
2 changed files with 15 additions and 2 deletions

View File

@@ -0,0 +1,13 @@
{% extends "fellchensammlung/base_bulma.html" %}
{% load i18n %}
{% load widget_tweaks %}
{% block content %}
<h1>{{ adoption_notice }}</h1>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form }}
<input class="button is-primary" type="submit" value="{% translate "Speichern" %}">
</form>
{% endblock %}

View File

@@ -165,7 +165,7 @@ def adoption_notice_edit(request, adoption_notice_id):
return redirect(reverse("adoption-notice-detail", args=[adoption_notice_instance.pk], ))
else:
form = AdoptionNoticeForm(instance=adoption_notice)
return render(request, 'fellchensammlung/forms/form-animal.html', context={"form": form})
return render(request, 'fellchensammlung/forms/form-adoption-notice-basic.html', context={"form": form})
def search_important_locations(request, important_location_slug):
@@ -683,7 +683,7 @@ def list_rescue_organizations(request, template='fellchensammlung/bulma-animal-s
def detail_view_rescue_organization(request, rescue_organization_id,
template='fellchensammlung/details/bulma-detail-rescue-organization.html'):
template='fellchensammlung/details/detail-rescue-organization.html'):
org = RescueOrganization.objects.get(pk=rescue_organization_id)
return render(request, template,
context={"org": org, "map_center": org.position, "zoom_level": 6, "map_pins": [org]})