Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5479 - GUIDE, EDITORIAL, EVENT TEMPLATES | Add extra required fields #1068

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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."
Loading