mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
Fixed Userfield initialization on /purchase and /inventory (fixes #2581)
This commit is contained in:
parent
b706f0c65a
commit
7d6b76effb
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user