mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 11:48:55 +00:00
Use the products "Quick consume amount" optionally also on the consume page (closes #1148)
This commit is contained in:
@@ -21,4 +21,22 @@ if (BoolVal(Grocy.UserSettings.show_warning_on_purchase_when_due_date_is_earlier
|
||||
$("#show_warning_on_purchase_when_due_date_is_earlier_than_next").prop("checked", true);
|
||||
}
|
||||
|
||||
if (BoolVal(Grocy.UserSettings.stock_default_consume_amount_use_quick_consume_amount))
|
||||
{
|
||||
$("#stock_default_consume_amount_use_quick_consume_amount").prop("checked", true);
|
||||
$("#stock_default_consume_amount").attr("disabled", "");
|
||||
}
|
||||
|
||||
RefreshLocaleNumberInput();
|
||||
|
||||
$("#stock_default_consume_amount_use_quick_consume_amount").on("click", function()
|
||||
{
|
||||
if (this.checked)
|
||||
{
|
||||
$("#stock_default_consume_amount").attr("disabled", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#stock_default_consume_amount").removeAttr("disabled");
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user