-
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
Two New UI Features #275
Two New UI Features #275
Conversation
Leaving it as a draft for the moment as the Spanish translations for the new messages need to be dropped in on Monday morning. |
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.
Thanks! Most comments are minor. It would I think be valuable to decompose the common logic in the vue_survey_form_*.js
scripts though as the duplications represent a maintenance burden (and avenue for bugs) should that logic need to be modified in the future
@@ -1631,13 +1678,25 @@ def get_nutrition(*, account_id=None, source_id=None): | |||
if has_error: | |||
return source_output | |||
|
|||
# Check the FFQ prereqs for the source (birth year, gender, height, weight |
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.
# Check the FFQ prereqs for the source (birth year, gender, height, weight | |
# Check the FFQ prereqs for the source (birth year, gender, height, weight) |
}, | ||
|
||
methods: { | ||
prettyJSON: function(json) { |
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.
A lot of the stuff here and below looks like it's replicated across multiple files. Can the common logic be centralized?
@@ -129,7 +129,7 @@ | |||
let kit_validation_setup_func = make_kit_validation_setup_func(form_name, kitSubmitHandler); | |||
kit_validation_setup_func() | |||
|
|||
{% for kit_samples in kits.values() | sort() %} | |||
{% for kit_samples in kits.values() %} |
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.
Was the sort not working?
</div> | ||
{% else %} | ||
<div class="barcode-col barcode-warning-text barcode-col-hide-mobile"> | ||
Info Needed |
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.
Info Needed | |
{{ _('Info Needed') }} |
|
||
/*$('button').on('click', function() { | ||
if($("form[name='ffq_code_form']").valid()) { | ||
updateButtonState(""); | ||
// $('#ffq_code_button').prop('disabled', true); | ||
} else { | ||
updateButtonState("yes"); | ||
// $('#ffq_code_button').prop('disabled', false); | ||
} | ||
});*/ |
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.
/*$('button').on('click', function() { | |
if($("form[name='ffq_code_form']").valid()) { | |
updateButtonState(""); | |
// $('#ffq_code_button').prop('disabled', true); | |
} else { | |
updateButtonState("yes"); | |
// $('#ffq_code_button').prop('disabled', false); | |
} | |
});*/ |
<div class="col-8 small-text survey-info">{{ _('Last modified') }} {{ detail.date_last_taken }}</div> | ||
{% else %} | ||
<div class="col-8 card-survey-new">{{ _('NEW') }}</div> | ||
{% if detail.survey_template_id == 10 %} |
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.
Could 10
be replaced with a named variable at the top of the template?
#~ msgid "Primary Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Pet Information" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Fermented Foods Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Surfer Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Personal Microbiome Information" | ||
#~ msgstr "" | ||
|
||
#~ msgid "COVID-19 Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Vioscreen Food Frequency Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Polyphenol Food Frequency Questionnaire" | ||
#~ msgstr "" | ||
|
||
#~ msgid "Cooking Oils and Oxalate-rich Foods" | ||
#~ msgstr "" | ||
|
||
#~ msgid "" | ||
#~ "It looks like you have not " | ||
#~ "completed the Basic Information survey " | ||
#~ "yet. If you begin your FFQ without" | ||
#~ " providing your height, weight, age, " | ||
#~ "and gender on the Basic Information " | ||
#~ "survey, your FFQ report will be " | ||
#~ "inaccurate. Do you wish to proceed " | ||
#~ "with the FFQ?" | ||
#~ msgstr "" | ||
|
||
#~ msgid "" | ||
#~ "You can also resume the FFQ later" | ||
#~ " by closing the browser tab. The " | ||
#~ "option to \"Continue FFQ\" will then " | ||
#~ "appear under My FFQs. " | ||
#~ msgstr "" | ||
|
||
#~ msgid "" | ||
#~ "Lifestyle, health, and diet information " | ||
#~ "is essential in order to gain " | ||
#~ "novel insights into the human microbiome" | ||
#~ " and design better studies. You can" | ||
#~ " help us by completing our surveys," | ||
#~ " starting with your Basic Information." | ||
#~ msgstr "" | ||
|
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.
#~ msgid "Primary Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Pet Information" | |
#~ msgstr "" | |
#~ msgid "Fermented Foods Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Surfer Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Personal Microbiome Information" | |
#~ msgstr "" | |
#~ msgid "COVID-19 Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Vioscreen Food Frequency Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Polyphenol Food Frequency Questionnaire" | |
#~ msgstr "" | |
#~ msgid "Cooking Oils and Oxalate-rich Foods" | |
#~ msgstr "" | |
#~ msgid "" | |
#~ "It looks like you have not " | |
#~ "completed the Basic Information survey " | |
#~ "yet. If you begin your FFQ without" | |
#~ " providing your height, weight, age, " | |
#~ "and gender on the Basic Information " | |
#~ "survey, your FFQ report will be " | |
#~ "inaccurate. Do you wish to proceed " | |
#~ "with the FFQ?" | |
#~ msgstr "" | |
#~ msgid "" | |
#~ "You can also resume the FFQ later" | |
#~ " by closing the browser tab. The " | |
#~ "option to \"Continue FFQ\" will then " | |
#~ "appear under My FFQs. " | |
#~ msgstr "" | |
#~ msgid "" | |
#~ "Lifestyle, health, and diet information " | |
#~ "is essential in order to gain " | |
#~ "novel insights into the human microbiome" | |
#~ " and design better studies. You can" | |
#~ " help us by completing our surveys," | |
#~ " starting with your Basic Information." | |
#~ msgstr "" |
This PR should be merged after #274