-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🗃️ [#4320] Add new configuration fields for cosign content
Added title and confirmation page configuration fields to control what is displayed on the confirmation page in the SDK. The runtime code will select the appropriate template depending on whether cosigning is required for the submission or not (it may be optional through form logic!)
- Loading branch information
1 parent
499e0d8
commit 4b3edb0
Showing
5 changed files
with
215 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
153 changes: 153 additions & 0 deletions
153
...g/migrations/0064_globalconfiguration_cosign_submission_confirmation_template_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
# Generated by Django 4.2.16 on 2024-11-12 17:46 | ||
|
||
import functools | ||
|
||
from django.db import migrations, models | ||
|
||
import tinymce.models | ||
|
||
import openforms.config.models.config | ||
import openforms.template.validators | ||
import openforms.utils.translations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("config", "0063_merge_20240923_1612"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_template", | ||
field=tinymce.models.HTMLField( | ||
default=functools.partial( | ||
openforms.config.models.config._render, | ||
*("config/default_cosign_submission_confirmation.html",), | ||
**{} | ||
), | ||
help_text="The content of the submission confirmation page for submissions requiring cosigning. The variables 'public_reference' and 'cosigner_email' are available. We strongly advise you to include the 'public_reference' in case users need to contact the customer service.", | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation template", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_template_en", | ||
field=tinymce.models.HTMLField( | ||
default=functools.partial( | ||
openforms.config.models.config._render, | ||
*("config/default_cosign_submission_confirmation.html",), | ||
**{} | ||
), | ||
help_text="The content of the submission confirmation page for submissions requiring cosigning. The variables 'public_reference' and 'cosigner_email' are available. We strongly advise you to include the 'public_reference' in case users need to contact the customer service.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation template", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_template_nl", | ||
field=tinymce.models.HTMLField( | ||
default=functools.partial( | ||
openforms.config.models.config._render, | ||
*("config/default_cosign_submission_confirmation.html",), | ||
**{} | ||
), | ||
help_text="The content of the submission confirmation page for submissions requiring cosigning. The variables 'public_reference' and 'cosigner_email' are available. We strongly advise you to include the 'public_reference' in case users need to contact the customer service.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation template", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_title", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Request not complete yet",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title for submissions requiring cosigning.", | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation title", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_title_en", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Request not complete yet",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title for submissions requiring cosigning.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation title", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="cosign_submission_confirmation_title_nl", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Request not complete yet",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title for submissions requiring cosigning.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="cosign submission confirmation title", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="submission_confirmation_title", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Confirmation: {{ reference }}",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title. You can (and should) use the 'public_reference' variable so the users have a reference in case they need to contact the customer service.", | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="submission confirmation title", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="submission_confirmation_title_en", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Confirmation: {{ reference }}",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title. You can (and should) use the 'public_reference' variable so the users have a reference in case they need to contact the customer service.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="submission confirmation title", | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="globalconfiguration", | ||
name="submission_confirmation_title_nl", | ||
field=models.CharField( | ||
default=functools.partial( | ||
openforms.utils.translations.get_default, | ||
*("Confirmation: {{ reference }}",), | ||
**{} | ||
), | ||
help_text="The content of the confirmation page title. You can (and should) use the 'public_reference' variable so the users have a reference in case they need to contact the customer service.", | ||
null=True, | ||
validators=[openforms.template.validators.DjangoTemplateValidator()], | ||
verbose_name="submission confirmation title", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
src/openforms/config/templates/config/default_cosign_submission_confirmation.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{% load i18n capture_tags %} | ||
{% capture as tt_openvariable silent %}{% templatetag openvariable %}{% endcapture %} | ||
{% capture as tt_closevariable silent %}{% templatetag closevariable %}{% endcapture %} | ||
<p>{% trans "Your request is not yet complete." %}</p> | ||
<h2>{% trans "Cosigning required" %}</h2> | ||
<p>{% blocktrans trimmed %} | ||
We've sent an email with a cosign request to | ||
<a href="mailto:{{ tt_openvariable }} cosigner_email {{ tt_closevariable }}">{{ tt_openvariable }} cosigner_email {{ tt_closevariable }}</a>. | ||
Once the submission has been cosigned we will start processing your request. | ||
{% endblocktrans %}</p> | ||
<p>{% blocktrans trimmed %} | ||
If you need to contact us about this submission, you can use the reference | ||
<strong>{{ tt_openvariable }} public_reference {{ tt_closevariable }}</strong>{% endblocktrans %}. | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters