Rewrite JS

This commit is contained in:
Gregory Trullemans 2024-01-23 18:55:03 +01:00
parent 08132787f8
commit 9e4e536e89
1 changed files with 7 additions and 7 deletions

View File

@ -134,15 +134,15 @@
function check_form_values()
{
var test = check_value_lower($('#id_mindstate').val());
test = test || check_value_lower($('#id_sleep').val());
test = test || check_value_upper($('#id_stress').val());
test = test || check_value_upper($('#id_fatigue').val());
test = test || check_value_upper($('#id_muscle_soreness').val());
var test = is_value_lower($('#id_mindstate').val());
test = test || is_value_lower($('#id_sleep').val());
test = test || is_value_upper($('#id_stress').val());
test = test || is_value_upper($('#id_fatigue').val());
test = test || is_value_upper($('#id_muscle_soreness').val());
return test
}
function check_value_lower(value)
function is_value_lower(value)
{
if(value <= 5)
return true
@ -150,7 +150,7 @@
return false
};
function check_value_upper(value)
function is_value_upper(value)
{
if(value >= 5)
return true