diff --git a/admin/templates/institution.html b/admin/templates/institution.html
index 88014b9..1d0977b 100644
--- a/admin/templates/institution.html
+++ b/admin/templates/institution.html
@@ -1,32 +1,49 @@
{% extends "base.html" %}
-{% load i18n %}
+{% load i18n django_bootstrap5 %}
{% block content %}
-
-
-
{{ subtitle }}
+
-{% load django_bootstrap5 %}
-
+ {% if form.errors %}
+
+
{% translate "Please fix the following errors:" %}
+
+ {% for field, errors in form.errors.items %}
+ - {{ field|title }}: {{ errors|join:", " }}
+ {% endfor %}
+
+
+
+ {% endif %}
+
+
+
+ {% bootstrap_field form.name addon_before='' %}
+ {% bootstrap_field form.location addon_before='' %}
+
+
+ {% bootstrap_field form.responsable_person addon_before='' %}
+ {% bootstrap_field form.supervisor_person addon_before='' %}
+ {% bootstrap_field form.logo addon_before='' %}
+
+
+
+
+
+
{% endblock %}
diff --git a/admin/views.py b/admin/views.py
index df4cf16..a747e72 100644
--- a/admin/views.py
+++ b/admin/views.py
@@ -127,6 +127,16 @@ class InstitutionView(AdminView, UpdateView):
"supervisor_person"
)
+ def get_form(self, form_class=None):
+ form = super().get_form(form_class)
+ form.fields["name"].help_text = _("Full name of the institution.")
+ form.fields["logo"].help_text = _("URL to the institution's logo.")
+ form.fields["location"].help_text = _("The address or city of the institution.")
+ form.fields["responsable_person"].help_text = _("Name of the institution's responsable person.")
+ form.fields["supervisor_person"].help_text = _("The supervisor's full name.")
+
+ return form
+
def get_form_kwargs(self):
self.object = self.request.user.institution
kwargs = super().get_form_kwargs()