feat: Explicitly note that global status message accepts HTML (#32209)

We've seen some confusion in the past about whether HTML is supported here.
This commit is contained in:
Tim McCormack
2023-05-12 12:37:34 -04:00
committed by GitHub
parent 47f7316f0a
commit 1088dc224f
2 changed files with 19 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# Generated by Django 3.2.18 on 2023-05-10 01:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('status', '0002_update_help_text'),
]
operations = [
migrations.AlterField(
model_name='globalstatusmessage',
name='message',
field=models.TextField(blank=True, help_text='<p>The contents of this field will be displayed as HTML in a warning banner on all views.</p><p>To override the banner message for a specific course, refer to the Course Message configuration. Course Messages will only work if the global status message is enabled, so if you only want to add a banner to specific courses without adding a global status message, you should add a global status message with <strong>empty</strong> message text.</p><p>Finally, disable the global status message by adding another empty message with "enabled" unchecked.</p>', null=True),
),
]

View File

@@ -23,7 +23,7 @@ class GlobalStatusMessage(ConfigurationModel):
message = models.TextField(
blank=True,
null=True,
help_text='<p>The contents of this field will be displayed as a warning banner on all views.</p>'
help_text='<p>The contents of this field will be displayed as HTML in a warning banner on all views.</p>'
'<p>To override the banner message for a specific course, refer to the Course Message configuration. ' # lint-amnesty, pylint: disable=line-too-long
'Course Messages will only work if the global status message is enabled, so if you only want to add '
'a banner to specific courses without adding a global status message, you should add a global status ' # lint-amnesty, pylint: disable=line-too-long