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

Reformat phone numbers in the contact form #3386

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

charludo
Copy link
Contributor

@charludo charludo commented Feb 3, 2025

Short description

Phone numbers should be reformatted in the contact form, analogously to how they are currently being reformatted after entering them in TinyMCE. This PR replicates the tinymce-based logic in a custom clean method on the ContactForm.

Proposed changes

  • add the reformatting logic
  • add some tests

Side effects

  • no

Resolved issues

Fixes: #3383


Pull Request Review Guidelines

@charludo charludo linked an issue Feb 3, 2025 that may be closed by this pull request
@charludo charludo force-pushed the fix/reformat-contact-phone-numbers branch from fd406a6 to 701dba4 Compare February 3, 2025 15:46
Copy link
Member

@MizukiTemma MizukiTemma left a comment

Choose a reason for hiding this comment

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

Looks good 😸 nice with a test 👍

@charludo charludo force-pushed the fix/reformat-contact-phone-numbers branch from 701dba4 to aced56f Compare February 5, 2025 08:40
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Wonderful! Thank you very much!

integreat_cms/cms/forms/contacts/contact_form.py Outdated Show resolved Hide resolved
@charludo charludo force-pushed the fix/reformat-contact-phone-numbers branch from aced56f to 0c490a8 Compare February 6, 2025 13:55
@charludo charludo requested a review from JoeyStk February 7, 2025 07:44
Copy link
Contributor

@JoeyStk JoeyStk left a comment

Choose a reason for hiding this comment

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

Thank you for clarifying and for the changes! Let's go! 🚀

@charludo charludo merged commit 1e86d0f into develop Feb 7, 2025
5 checks passed
@charludo charludo deleted the fix/reformat-contact-phone-numbers branch February 7, 2025 13:47
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.

Convert contact phone numbers to international format
3 participants