Skip to content

Commit

Permalink
apps/cms: change helptext for captcha on contact form
Browse files Browse the repository at this point in the history
- make contact form and signup use the same captcha helptext and replace
  the broken <br> tag with <strong>.

fixes #2843
  • Loading branch information
goapunk committed Jan 14, 2025
1 parent 8c83146 commit 8001081
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 3 additions & 3 deletions apps/cms/contacts/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

from apps.captcha.fields import CaptcheckCaptchaField
from apps.cms.emails import AnswerToContactFormEmail
from apps.cms.settings import helpers
from apps.contrib.translations import TranslatedField
from apps.users.forms import CAPTCHA_HELP


class FormField(AbstractFormField):
Expand All @@ -33,9 +35,7 @@ def formfields(self):
if hasattr(settings, "CAPTCHA_URL") and settings.CAPTCHA_URL:
fields["captcha"] = CaptcheckCaptchaField(
label=_("I am not a robot"),
help_text=_(
"If you are having difficulty please contact" "us, details adjacent"
),
help_text=helpers.add_email_link_to_helptext("", CAPTCHA_HELP),
)

return fields
Expand Down
4 changes: 2 additions & 2 deletions apps/users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
logger = logging.getLogger(__name__)

CAPTCHA_HELP = _(
"Solve the math problem and click on the correct result.<br>"
"If you are having difficulty please contact us by {}email{}."
"Solve the math problem and click on the correct result.<strong>"
"If you are having difficulty please contact us by {}email{}.</strong>"
)


Expand Down
6 changes: 6 additions & 0 deletions changelog/_0001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Changed

- change captcha helptext on contact form to be identical to the sign up form
captcha
- remove the broken <br> tag from the captcha helptext and replace it with
<strong>

0 comments on commit 8001081

Please sign in to comment.