Skip to content

Include terms and conditions agreement checkbox in registration#677

Merged
AdrianDAlessandro merged 2 commits intomainfrom
terms-agreement
Apr 13, 2026
Merged

Include terms and conditions agreement checkbox in registration#677
AdrianDAlessandro merged 2 commits intomainfrom
terms-agreement

Conversation

@AdrianDAlessandro
Copy link
Copy Markdown
Collaborator

@AdrianDAlessandro AdrianDAlessandro commented Apr 1, 2026

Description

This PR adds a checkbox to the registration form that must be checked for users to register. This checkbox is to agree to the pre-existing privacy policy and terms and conditions.

It also saves this with a corresponding timestamp in the database along with the user. So we know when they registered and when they checked the acceptance box.

Fixes #669

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@davehorsfall davehorsfall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all working for me. I've just left some minor accessibility comments to address. Happy to approve after that.

Comment thread main/forms.py Outdated
self.fields["tos"].label = _(
format_html(
'I have read and agree to the <a href="{}">Terms and Conditions</a> and'
' <a href="{}">Privacy Policy</a>.',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding following to both tags to improve accessibility:
target="_blank" rel="noopener noreferrer"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Copy Markdown
Collaborator

@davehorsfall davehorsfall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@AdrianDAlessandro AdrianDAlessandro merged commit e5a2a3b into main Apr 13, 2026
5 checks passed
@AdrianDAlessandro AdrianDAlessandro deleted the terms-agreement branch April 13, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include a privacy agreement checkbox when registering

2 participants