mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 20:11:16 +00:00
Properly show and handle that the new amount during inventory cannot equal the current stock amount (this now closes #224)
This commit is contained in:
@@ -13,3 +13,15 @@ $(".numberpicker-up-button").unbind('click').on("click", function()
|
||||
$(inputElement).trigger('keyup');
|
||||
$(inputElement).trigger('change');
|
||||
});
|
||||
|
||||
$(".numberpicker").on("keyup", function()
|
||||
{
|
||||
if ($(this).data("not-equal") && !$(this).data("not-equal").toString().isEmpty() && $(this).data("not-equal") == $(this).val())
|
||||
{
|
||||
$(this)[0].setCustomValidity("error");
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this)[0].setCustomValidity("");
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user