Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 2 additions & 10 deletions templates/partials/communication_preferences_fields.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,15 @@
return;
}

function syncSubPreferences() {
master.addEventListener('change', function () {
if (master.checked) {
subPrefs.style.display = '';
updates.checked = true;
} else {
subPrefs.style.display = 'none';
updates.checked = false;
marketing.checked = false;
}
}

master.addEventListener('change', function () {
if (master.checked) {
subPrefs.style.display = '';
updates.checked = true;
} else {
syncSubPreferences();
}
});
});
})();
Expand Down
3 changes: 3 additions & 0 deletions tests/routers/core/test_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,9 @@ def test_register_page_shows_password_requirements(unauth_client: TestClient):
assert 'name="comm_opt_in"' in html
assert 'name="comm_updates"' in html
assert 'name="comm_marketing"' in html


def test_register_page_confirm_password_has_autocomplete(unauth_client: TestClient):
"""Issue #156: Both password fields must have autocomplete='new-password' for Chrome autofill."""
response = unauth_client.get(app.url_path_for("read_register"))
assert response.status_code == 200
Expand Down
Loading