diff options
author | Michael Manfre | 2022-11-22 21:52:40 -0500 |
---|---|---|
committer | GitHub | 2022-11-22 19:52:40 -0700 |
commit | cdfff32f9af75730ca560833744433f1dc07067f (patch) | |
tree | d62719a4bd3269ec33f7bcde6c1a783fcef9792e /activities | |
parent | db0edcd2ae7ad3d191974a47b8c0da8c3fc31e80 (diff) | |
download | takahe-cdfff32f9af75730ca560833744433f1dc07067f.tar.gz takahe-cdfff32f9af75730ca560833744433f1dc07067f.tar.bz2 takahe-cdfff32f9af75730ca560833744433f1dc07067f.zip |
Content warning name customisation
Allows the name of Content Warning to be customized (e.g. to "Content Summary").
Fixes #28.
Diffstat (limited to 'activities')
-rw-r--r-- | activities/views/posts.py | 3 | ||||
-rw-r--r-- | activities/views/timelines.py | 4 |
2 files changed, 5 insertions, 2 deletions
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"), }, ), ) |