mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Fixed Userfield initialization on /purchase and /inventory (fixes #2581)
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
|
||||
### Userfields
|
||||
|
||||
- xxx
|
||||
- Fixed that Userfield default values were not initialized for the `stock` entity (so affecting the purchase and inventory page)
|
||||
|
||||
### General
|
||||
|
||||
|
@@ -548,3 +548,5 @@ if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Grocy.Components.UserfieldsForm.Load();
|
||||
|
@@ -738,3 +738,5 @@ if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_LABEL_PRINTER)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Grocy.Components.UserfieldsForm.Load();
|
||||
|
@@ -111,13 +111,18 @@ $("#type").on("change", function(e)
|
||||
$("#default-value-group.userfield-type-" + value).removeClass("d-none");
|
||||
});
|
||||
|
||||
$('#entity').focus();
|
||||
|
||||
if (GetUriParam("entity"))
|
||||
{
|
||||
$("#entity").val(GetUriParam("entity"));
|
||||
$("#entity").trigger("change");
|
||||
$('#name').focus();
|
||||
setTimeout(function()
|
||||
{
|
||||
$('#name').focus();
|
||||
}, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#entity').focus();
|
||||
}
|
||||
|
||||
$("#type").trigger("change");
|
||||
|
Reference in New Issue
Block a user