Fix max value handling in prefs input.

This commit is contained in:
Nicolo Maio 2024-01-18 11:02:58 +01:00
parent ad04839c4d
commit 7a27d531a4

View file

@ -323,7 +323,7 @@ function prefsInputFieldPrefs(label, comment, prekey, key, default_value, _input
const value = Number(this.value);
/* Incorrect value, text danger class! */
if(value < min_value || value > max_value) {
if(value < min_value || (max_value != 0 && value > max_value)) {
this.classList.add('text-danger');
this.classList.add('ntopng-input-error');
$("#]] print("input_error_" .. key) print[[").removeAttr('hidden');