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

Allow Minors to Change age_range on Source #306

Merged
merged 6 commits into from
Dec 12, 2023
Merged

Conversation

cassidysymons
Copy link
Collaborator

No description provided.

@cassidysymons cassidysymons requested a review from wasade December 11, 2023 16:03
@cassidysymons cassidysymons marked this pull request as ready for review December 11, 2023 16:03
microsetta_interface/implementation.py Outdated Show resolved Hide resolved
microsetta_interface/implementation.py Show resolved Hide resolved
microsetta_interface/implementation.py Outdated Show resolved Hide resolved
microsetta_interface/implementation.py Outdated Show resolved Hide resolved
microsetta_interface/implementation.py Outdated Show resolved Hide resolved
microsetta_interface/implementation.py Outdated Show resolved Hide resolved
<input type="radio" id="age-range-3" name="age-range" value="13-17" onchange="change_consent_div(this)">
<label for="age-range-3" class="consent-age-label">{{ tl['PARTICIPANT_FORM']['AGE_13_17'] |e}}</label>
</div>
{% if cur_age_index <= 0 %}
Copy link
Member

Choose a reason for hiding this comment

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

This and below is testing against a magic number. Can this be changed to test against an exact value, eg if cur_age in ('UNKNOWN', '0-6')? Though ideally these aren't strings but instead string literals though that may be weird crossing the boundary into jinja

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed the magic number situation. The age ranges are now string literals in implementation.py, but I agree that copying them into the jinja2 template would be both weird and clunky. Other than that, this PR is ready for re-review, but it won't pass integration tests until the corresponding Private API PR has been merged.

@wasade
Copy link
Member

wasade commented Dec 11, 2023 via email

@cassidysymons
Copy link
Collaborator Author

@wasade Workflow is passing now after merging the corresponding Private API PR. Any further feedback or is this also good to merge?

@wasade
Copy link
Member

wasade commented Dec 12, 2023

Nah, +1, thanks!

@wasade wasade merged commit 4d4db88 into master Dec 12, 2023
3 checks passed
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.

2 participants