diff --git a/scipost_django/organizations/forms.py b/scipost_django/organizations/forms.py index cd4681405aaf1420fe562169b6d2da587a7b93f9..bb618d15cc90bb11c11c21afa9dd6c28b5507c32 100644 --- a/scipost_django/organizations/forms.py +++ b/scipost_django/organizations/forms.py @@ -167,6 +167,7 @@ class ContactPersonForm(forms.ModelForm): fields = "__all__" widgets = { "date_deprecated": forms.DateInput(attrs={"type": "date"}), + "info_source": forms.Textarea(attrs={"rows": 2}), } def clean(self): diff --git a/scipost_django/organizations/migrations/0024_contactperson_info_source.py b/scipost_django/organizations/migrations/0024_contactperson_info_source.py new file mode 100644 index 0000000000000000000000000000000000000000..de00c0962a8ca72db9087e1c838d159e7be84bca --- /dev/null +++ b/scipost_django/organizations/migrations/0024_contactperson_info_source.py @@ -0,0 +1,17 @@ +# Generated by Django 4.2.15 on 2024-10-09 09:03 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("organizations", "0023_alter_contactperson_role"), + ] + + operations = [ + migrations.AddField( + model_name="contactperson", + name="info_source", + field=models.TextField(blank=True, verbose_name="Information source"), + ), + ] diff --git a/scipost_django/organizations/models.py b/scipost_django/organizations/models.py index f2b9295cd330cdedb538b6bf01a8c3e45531347c..b6054472faebc1c748e2eef03714075e2395b09a 100644 --- a/scipost_django/organizations/models.py +++ b/scipost_django/organizations/models.py @@ -710,6 +710,7 @@ class ContactPerson(models.Model): last_name = models.CharField(max_length=64) email = models.EmailField() role = models.CharField(max_length=128, blank=True, null=True) + info_source = models.TextField(blank=True, verbose_name="Information source") status = models.CharField( max_length=16, choices=STATUS_CHOICES, default=STATUS_UNKNOWN ) diff --git a/scipost_django/organizations/templates/organizations/_organization_card.html b/scipost_django/organizations/templates/organizations/_organization_card.html index 00f9598b7a8f161311c94281c391336f24381f63..1f41b9c31a0acb98c2b3ec131241d75128cf6bbe 100644 --- a/scipost_django/organizations/templates/organizations/_organization_card.html +++ b/scipost_django/organizations/templates/organizations/_organization_card.html @@ -773,6 +773,7 @@ <th>Name</th> <th>Email</th> <th>Role</th> + <th>Source</th> <th>Status</th> {% if perms.scipost.can_manage_organizations or "can_view_org_contacts" in user_org_perms %} @@ -785,6 +786,7 @@ <td>{{ contactperson }}</td> <td>{{ contactperson.email }}</td> <td>{{ contactperson.role }}</td> + <td>{{ contactperson.info_source }}</td> <td>{{ contactperson.get_status_display }} {% if contactperson.status == 'deprecated' %} <div class="text-muted">{{ contactperson.date_deprecated|date:"Y-m-d" }}</div>