2018-10-20 14:55:49 +02:00
|
|
|
|
$("#product_presets_location_id").val(Grocy.UserSettings.product_presets_location_id);
|
|
|
|
|
$("#product_presets_product_group_id").val(Grocy.UserSettings.product_presets_product_group_id);
|
|
|
|
|
$("#product_presets_qu_id").val(Grocy.UserSettings.product_presets_qu_id);
|
2020-11-15 19:53:44 +01:00
|
|
|
|
$("#stock_due_soon_days").val(Grocy.UserSettings.stock_due_soon_days);
|
2019-05-04 13:19:34 +02:00
|
|
|
|
$("#stock_default_purchase_amount").val(Grocy.UserSettings.stock_default_purchase_amount);
|
|
|
|
|
$("#stock_default_consume_amount").val(Grocy.UserSettings.stock_default_consume_amount);
|
2020-10-20 13:08:54 -05:00
|
|
|
|
$("#stock_decimal_places_amounts").val(Grocy.UserSettings.stock_decimal_places_amounts);
|
|
|
|
|
$("#stock_decimal_places_prices").val(Grocy.UserSettings.stock_decimal_places_prices);
|
2020-04-13 18:47:41 +02:00
|
|
|
|
|
|
|
|
|
if (BoolVal(Grocy.UserSettings.show_icon_on_stock_overview_page_when_product_is_on_shopping_list))
|
|
|
|
|
{
|
|
|
|
|
$("#show_icon_on_stock_overview_page_when_product_is_on_shopping_list").prop("checked", true);
|
|
|
|
|
}
|
2020-10-17 11:03:47 +02:00
|
|
|
|
if (BoolVal(Grocy.UserSettings.show_purchased_date_on_purchase))
|
2020-10-17 03:54:10 -05:00
|
|
|
|
{
|
2020-10-17 11:03:47 +02:00
|
|
|
|
$("#show_purchased_date_on_purchase").prop("checked", true);
|
2020-10-17 03:54:10 -05:00
|
|
|
|
}
|
2020-11-14 23:15:34 +01:00
|
|
|
|
|
2020-11-15 19:53:44 +01:00
|
|
|
|
if (BoolVal(Grocy.UserSettings.show_warning_on_purchase_when_due_date_is_earlier_than_next))
|
2020-11-14 23:15:34 +01:00
|
|
|
|
{
|
2020-11-15 19:53:44 +01:00
|
|
|
|
$("#show_warning_on_purchase_when_due_date_is_earlier_than_next").prop("checked", true);
|
2020-11-14 23:15:34 +01:00
|
|
|
|
}
|
2020-11-15 14:15:09 +01:00
|
|
|
|
|
2020-12-04 18:16:58 +01:00
|
|
|
|
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", "");
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-13 19:29:23 +02:00
|
|
|
|
if (BoolVal(Grocy.UserSettings.stock_auto_decimal_separator_prices))
|
|
|
|
|
{
|
|
|
|
|
$("#stock_auto_decimal_separator_prices").prop("checked", true);
|
|
|
|
|
}
|
|
|
|
|
|
2020-11-15 14:15:09 +01:00
|
|
|
|
RefreshLocaleNumberInput();
|
2020-12-04 18:16:58 +01:00
|
|
|
|
|
|
|
|
|
$("#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");
|
|
|
|
|
}
|
|
|
|
|
});
|