Skip to content

Commit

Permalink
Merge branch 'updates/5479-making-extra-fields-required' of github.co…
Browse files Browse the repository at this point in the history
…m:torchbox/rca-wagtail-2019 into dev
  • Loading branch information
Patrick Gan committed Jan 17, 2025
2 parents c06a6b2 + 2219748 commit b4df74a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions rca/utils/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,18 @@ def __init__(self, *args, **kwargs):
"content users can expect to find on the page. <strong>Recommended length: 50 to 160 "
"characters</strong>."
)

# Listing Image field configuration
if listing_image_field := self.fields.get("listing_image"):
listing_image_field.required = True
listing_image_field.help_text = "This image is required for listings."

# Social Image field configuration
if social_image_field := self.fields.get("social_image"):
social_image_field.required = True
social_image_field.help_text = "You must specify a social image."

# Social Text field configuration
if social_text_field := self.fields.get("social_text"):
social_text_field.required = True
social_text_field.help_text = "You must specify a social text."

0 comments on commit b4df74a

Please sign in to comment.