diff --git a/dojo/db_migrations/0217_system_settings_disclaimer_notif.py b/dojo/db_migrations/0217_system_settings_disclaimer_notif.py new file mode 100644 index 0000000000..785142e878 --- /dev/null +++ b/dojo/db_migrations/0217_system_settings_disclaimer_notif.py @@ -0,0 +1,21 @@ +# Generated by Django 5.0.8 on 2024-09-12 18:22 + +from django.db import migrations + + +def copy_notif_field(apps, schema_editor): + system_settings_model = apps.get_model('dojo', 'System_Settings') + if system_settings_model.disclaimer_notifications: + system_settings_model.disclaimer_reports = system_settings_model.disclaimer_notifications + system_settings_model.save() + + +class Migration(migrations.Migration): + + dependencies = [ + ('dojo', '0216_system_settings_disclaimer_notif'), + ] + + operations = [ + migrations.RunPython(copy_notif_field), + ] diff --git a/dojo/forms.py b/dojo/forms.py index 031c70a6c9..d6f5513bc7 100644 --- a/dojo/forms.py +++ b/dojo/forms.py @@ -2293,7 +2293,7 @@ def __init__(self, *args, **kwargs): if get_system_setting("disclaimer_reports_forced"): self.fields["include_disclaimer"].disabled = True self.fields["include_disclaimer"].initial = "1" # represents yes - self.fields["include_disclaimer"].help_text="Administrator of the system enforced placement of disclaimer in all reports. You are not able exclude disclaimer from this report." + self.fields["include_disclaimer"].help_text = "Administrator of the system enforced placement of disclaimer in all reports. You are not able exclude disclaimer from this report." class CustomReportOptionsForm(forms.Form): diff --git a/dojo/templates/dojo/edit_note.html b/dojo/templates/dojo/edit_note.html index b85a1fa070..9688855d8c 100644 --- a/dojo/templates/dojo/edit_note.html +++ b/dojo/templates/dojo/edit_note.html @@ -3,6 +3,12 @@ {% block content %} {{ block.super }}

{% trans "Edit Note" %}


+ {% if system_settings.disclaimer_notes %} +
+ Disclaimer
+

{{ system_settings.disclaimer_notes }}

+
+ {% endif %}
{% csrf_token %} {% include "dojo/form_fields.html" with form=form %}