Skip to content

Commit ae061d7

Browse files
committed
✨ [#85] Add email template for successful deletion
1 parent 8b872e0 commit ae061d7

File tree

4 files changed

+61
-1
lines changed

4 files changed

+61
-1
lines changed

backend/src/openarchiefbeheer/emails/admin.py

+9
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,13 @@ class EmailConfigAdmin(SingletonModelAdmin):
4747
]
4848
},
4949
),
50+
(
51+
_("Templates successful deletion"),
52+
{
53+
"fields": [
54+
"subject_successful_deletion",
55+
"body_successful_deletion",
56+
]
57+
},
58+
),
5059
]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Generated by Django 4.2.14 on 2024-07-26 14:01
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("emails", "0003_emailconfig_body_error_during_deletion_and_more"),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name="emailconfig",
15+
name="body_successful_deletion",
16+
field=models.TextField(
17+
blank=True,
18+
help_text="Body of the email that will be sent to all the assignees when a list is successfully deleted.",
19+
verbose_name="body successful deletion",
20+
),
21+
),
22+
migrations.AddField(
23+
model_name="emailconfig",
24+
name="subject_successful_deletion",
25+
field=models.CharField(
26+
blank=True,
27+
help_text="Subject of the email that will be sent to all the assignees when a list is successfully deleted.",
28+
max_length=250,
29+
verbose_name="subject successful deletion",
30+
),
31+
),
32+
]

backend/src/openarchiefbeheer/emails/models.py

+17
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,23 @@ class EmailConfig(SingletonModel):
101101
),
102102
blank=True,
103103
)
104+
subject_successful_deletion = models.CharField(
105+
max_length=250,
106+
verbose_name=_("subject successful deletion"),
107+
help_text=_(
108+
"Subject of the email that will be sent to all the assignees "
109+
"when a list is successfully deleted."
110+
),
111+
blank=True,
112+
)
113+
body_successful_deletion = models.TextField(
114+
verbose_name=_("body successful deletion"),
115+
help_text=_(
116+
"Body of the email that will be sent to all the assignees "
117+
"when a list is successfully deleted."
118+
),
119+
blank=True,
120+
)
104121

105122
class Meta:
106123
verbose_name = _("email configuration")

backend/src/openarchiefbeheer/fixtures/default_emails.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
"subject_changes_requested": "Voorstel voor wijziging van uw vernietigingslijst",
1515
"body_changes_requested": "Beste {{ user }},\r\n\r\nEr is een voorstel tot aanpassing van uw vernietigingslijst {{ list }}. U kunt de lijst en de voorgestelde wijziging in de Open-Archiefbeheer web app bekijken en af te handelen.",
1616
"subject_error_during_deletion": "Fout tijdens vernietiging",
17-
"body_error_during_deletion": "Beste {{ user }},\r\n\r\nEr is een fout opgetreden tijdens het vernietigen van vernietigingslijst {{ list }}. Probeer het opnieuw of neem contact op met de IT afdeling."
17+
"body_error_during_deletion": "Beste {{ user }},\r\n\r\nEr is een fout opgetreden tijdens het vernietigen van vernietigingslijst {{ list }}. Probeer het opnieuw of neem contact op met de IT afdeling.",
18+
"subject_successful_deletion": "Lijst succesvol verwerkt",
19+
"body_successful_deletion": "Beste,\r\n\r\nLijst {{ list }} is succesvol verwerkt. Alle zaken en gerelateerde objecten zijn vernietigd."
1820
}
1921
}
2022
]

0 commit comments

Comments
 (0)