diff --git a/AUTHORS.rst b/AUTHORS.rst index 859ffbe9c..234bbc14a 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -27,6 +27,7 @@ Developers * Scott Peshak: https://github.com/speshak * Musanje Louis Michael: https://github.com/louiCoder * Kevin Antonio Rateni Iatauro: https://github.com/WalkingPizza +* Sven - https://github.com/Svn-Sp Translators ----------- diff --git a/requirements.txt b/requirements.txt index 711f7c237..31a3c128a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,7 +3,7 @@ # # Application -bleach~=3.1 +bleach~=3.2 django-bootstrap-breadcrumbs~=0.9 django-formtools~=2.2 django-recaptcha==2.0.6 diff --git a/wger/weight/static/js/weight.js b/wger/weight/static/js/weight.js index fcb507c03..d0984f230 100644 --- a/wger/weight/static/js/weight.js +++ b/wger/weight/static/js/weight.js @@ -79,5 +79,14 @@ $(document).ready(function () { MG.data_graphic(chartParams); } }); + + $(document.querySelector("#enable_bmi")).click(function(){ + var height = document.querySelector("#height").value / 100; + //kg = bmi * cm² + let max = height*height * 25; + let min = height*height * 19; + chartParams.baselines = [{value:max, label:"slight overweight"},{value:min, label:"slight underweight"}]; + MG.data_graphic(chartParams); + }); }); diff --git a/wger/weight/templates/overview.html b/wger/weight/templates/overview.html index 87eeb8ef9..6af4479d5 100644 --- a/wger/weight/templates/overview.html +++ b/wger/weight/templates/overview.html @@ -30,7 +30,9 @@ {% endif %}
- +
+ +