From cdfff32f9af75730ca560833744433f1dc07067f Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Tue, 22 Nov 2022 21:52:40 -0500 Subject: Content warning name customisation Allows the name of Content Warning to be customized (e.g. to "Content Summary"). Fixes #28.--- activities/views/posts.py | 3 ++- activities/views/timelines.py | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'activities') diff --git a/activities/views/posts.py b/activities/views/posts.py index 7950093..fce17e3 100644 --- a/activities/views/posts.py +++ b/activities/views/posts.py @@ -135,9 +135,10 @@ class Compose(FormView): ) content_warning = forms.CharField( required=False, + label=Config.lazy_system_value("content_warning_text"), widget=forms.TextInput( attrs={ - "placeholder": "Content Warning", + "placeholder": Config.lazy_system_value("content_warning_text"), }, ), help_text="Optional - Post will be hidden behind this text until clicked", diff --git a/activities/views/timelines.py b/activities/views/timelines.py index e4c9920..837e5df 100644 --- a/activities/views/timelines.py +++ b/activities/views/timelines.py @@ -5,6 +5,7 @@ from django.utils.decorators import method_decorator from django.views.generic import FormView, ListView from activities.models import Post, PostInteraction, TimelineEvent +from core.models import Config from users.decorators import identity_required @@ -23,10 +24,11 @@ class Home(FormView): ) content_warning = forms.CharField( required=False, + label=Config.lazy_system_value("content_warning_text"), widget=forms.TextInput( attrs={ - "placeholder": "Content Warning", "class": "hidden", + "placeholder": Config.lazy_system_value("content_warning_text"), }, ), ) -- cgit v1.2.3