fix: migrate registration newsletter to native HTML checkbox#11400
fix: migrate registration newsletter to native HTML checkbox#11400jimchamp merged 10 commits intointernetarchive:masterfrom
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
PTAL @jimchamp, thanks. |
There was a problem hiding this comment.
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_newsletterCheckbox field from theRegisterFormclass - Adds direct HTML checkbox markup for
ia_newsletterin 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.
|
could anyone please suggest if I can make both checkboxes the same? |
jimchamp
left a comment
There was a problem hiding this comment.
Thanks @akramcodez! This is nearly ready to be merged, you'll just need to do the following:
- Replace the other
Checkboxthat is used on the registration page with HTML - Remove the
Checkboxdefinition.
Please ensure that you are assigned to issues before working on them in the future.
for more information, see https://pre-commit.ci
|
@jimchamp done :) |
jimchamp
left a comment
There was a problem hiding this comment.
Almost there -- you forgot to remove the Checkbox definition
for more information, see https://pre-commit.ci
|
@jimchamp Sorry for my previous mistake. I’ve deleted the unwanted things now. If there’s any problem let me know. |
Closes #10731
Changes
Screenshot
Stakeholders
@jimchamp