diff --git a/src/fellchensammlung/forms.py b/src/fellchensammlung/forms.py index 63b69e2..2ee6f29 100644 --- a/src/fellchensammlung/forms.py +++ b/src/fellchensammlung/forms.py @@ -1,7 +1,7 @@ from django import forms from .models import AdoptionNotice, Animal, Image, ReportAdoptionNotice, ReportComment, ModerationAction, User, Species, \ - Comment, SexChoicesWithAll, DistanceChoices + Comment, SexChoicesWithAll, DistanceChoices, SpeciesSpecificURL from django_registration.forms import RegistrationForm from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, Layout, Fieldset, HTML, Row, Column, Field, Hidden @@ -111,6 +111,12 @@ class CommentForm(forms.ModelForm): fields = ('text',) +class SpeciesURLForm(forms.ModelForm): + class Meta: + model = SpeciesSpecificURL + fields = ('species', 'url') + + class ModerationActionForm(forms.ModelForm): class Meta: model = ModerationAction diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-check-rescue-org.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-check-rescue-org.html index ce41163..4703d81 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-check-rescue-org.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-check-rescue-org.html @@ -19,6 +19,19 @@ {{ rescue_org.website|domain }} {% endif %} + {% for species_url in rescue_org.species_urls %} +
{{ species_url.species }}: {{ species_url.url }}
+ {% endfor %} + {% if set_species_url_available %} + + + {% endif %}