Merge branch 'master' of github.com:wger-project/wger

This commit is contained in:
Roland Geider
2020-09-20 20:01:53 +02:00
4 changed files with 14 additions and 2 deletions

View File

@@ -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
-----------

View File

@@ -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

View File

@@ -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);
});
});

View File

@@ -30,7 +30,9 @@
{% endif %}
<div id="weight_diagram"></div>
<br>
<input id="height" placeholder="height in cm" type="number">
<input id="enable_bmi" type="button" value="BMI">
<div class="btn-group modify-time-period-controls float-right" role="group" aria-label="..." style="padding-bottom: 1em;">
<button type="button" class="btn btn-light" data-time_period="90">{% trans "Last 3 months" %}</button>