Skip to content

fix: migrate registration newsletter to native HTML checkbox#11400

Merged
jimchamp merged 10 commits intointernetarchive:masterfrom
akramcodez:fix/native-newsletter-checkbox
Dec 4, 2025
Merged

fix: migrate registration newsletter to native HTML checkbox#11400
jimchamp merged 10 commits intointernetarchive:masterfrom
akramcodez:fix/native-newsletter-checkbox

Conversation

@akramcodez
Copy link
Contributor

Closes #10731

Changes

  • Replaced custom Checkbox logic with standard HTML checkbox
  • Updated registration form and template to use default behavior
  • Verified checked boxes now correctly post values, unchecked omitted

Screenshot

image

Stakeholders

@jimchamp

@akramcodez
Copy link
Contributor Author

PTAL @jimchamp, thanks.

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Oct 31, 2025
Copilot AI review requested due to automatic review settings November 4, 2025 12:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the Internet Archive newsletter checkbox from being a form-rendered input to a hardcoded HTML input in the signup template.

  • Removes the ia_newsletter Checkbox field from the RegisterForm class
  • Adds direct HTML checkbox markup for ia_newsletter in the template
  • Updates the i18n message location from Python forms file to the HTML template

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
openlibrary/plugins/upstream/forms.py Removes the ia_newsletter Checkbox field definition from RegisterForm
openlibrary/templates/account/create.html Adds hardcoded HTML checkbox input for ia_newsletter with inline label
openlibrary/i18n/messages.pot Moves the newsletter checkbox text translation entry from forms.py to account/create.html

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akramcodez
Copy link
Contributor Author

could anyone please suggest if I can make both checkboxes the same?

Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Thanks @akramcodez! This is nearly ready to be merged, you'll just need to do the following:

  • Replace the other Checkbox that is used on the registration page with HTML
  • Remove the Checkbox definition.

Please ensure that you are assigned to issues before working on them in the future.

@jimchamp jimchamp added Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] and removed Needs: Response Issues which require feedback from lead labels Dec 3, 2025
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Dec 3, 2025
@akramcodez
Copy link
Contributor Author

@jimchamp done :)

@akramcodez akramcodez requested a review from jimchamp December 3, 2025 17:33
Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Almost there -- you forgot to remove the Checkbox definition

@jimchamp jimchamp added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Dec 3, 2025
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Dec 4, 2025
@akramcodez akramcodez requested a review from jimchamp December 4, 2025 04:29
@akramcodez
Copy link
Contributor Author

@jimchamp Sorry for my previous mistake. I’ve deleted the unwanted things now. If there’s any problem let me know.

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Dec 4, 2025
Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Thanks @akramcodez!

@jimchamp jimchamp merged commit 2b8011f into internetarchive:master Dec 4, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Response Issues which require feedback from lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox.checked doesn't always return the expected result

2 participants