-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conversation
<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 %} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Co-authored-by: Daniel McDonald <[email protected]>
Thanks!
…On Mon, Dec 11, 2023, 15:29 Cassidy Symons ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In microsetta_interface/templates/new_participant.jinja2
<https://urldefense.com/v3/__https://github.com/biocore/microsetta-interface/pull/306*discussion_r1423235224__;Iw!!Mih3wA!GRhP66cHrp6JNRGy8S5SySBzst0TwEh_7mk9ovLF44iTCdj4rjlqQBIsRSCNrX2M6CXLBHfWppklP_Ga0qk8umH58Fhl8zFEP-vG5g$>
:
> @@ -243,18 +258,24 @@
</div>
<div class="row mb-4">
{% if language_tag != "ja_JP" %}
- <div class="col-md">
- <input type="radio" id="age-range-1" name="age-range" value="0-6" onchange="change_consent_div(this)">
- <label for="age-range-1" class="consent-age-label">{{ tl['PARTICIPANT_FORM']['AGE_0_6'] |e}}</label>
- </div>
- <div class="col-md">
- <input type="radio" id="age-range-2" name="age-range" value="7-12" onchange="change_consent_div(this)">
- <label for="age-range-2" class="consent-age-label">{{ tl['PARTICIPANT_FORM']['AGE_7_12'] |e}}</label>
- </div>
- <div class="col-md">
- <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 %}
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.
—
Reply to this email directly, view it on GitHub
<https://urldefense.com/v3/__https://github.com/biocore/microsetta-interface/pull/306*discussion_r1423235224__;Iw!!Mih3wA!GRhP66cHrp6JNRGy8S5SySBzst0TwEh_7mk9ovLF44iTCdj4rjlqQBIsRSCNrX2M6CXLBHfWppklP_Ga0qk8umH58Fhl8zFEP-vG5g$>,
or unsubscribe
<https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AADTZMV6YZHZF2D7EXVEL7TYI6JNRAVCNFSM6AAAAABAOJRUYOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONZWGM2DMMRZHA__;!!Mih3wA!GRhP66cHrp6JNRGy8S5SySBzst0TwEh_7mk9ovLF44iTCdj4rjlqQBIsRSCNrX2M6CXLBHfWppklP_Ga0qk8umH58Fhl8zGu3pozZQ$>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
@wasade Workflow is passing now after merging the corresponding Private API PR. Any further feedback or is this also good to merge? |
Nah, +1, thanks! |
No description provided.