mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 12:20:22 +00:00
Fixed Userfield initialization on /purchase and /inventory (fixes #2581)
This commit is contained in:
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
### Userfields
|
### Userfields
|
||||||
|
|
||||||
- xxx
|
- Fixed that Userfield default values were not initialized for the `stock` entity (so affecting the purchase and inventory page)
|
||||||
|
|
||||||
### General
|
### 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");
|
$("#default-value-group.userfield-type-" + value).removeClass("d-none");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#entity').focus();
|
|
||||||
|
|
||||||
if (GetUriParam("entity"))
|
if (GetUriParam("entity"))
|
||||||
{
|
{
|
||||||
$("#entity").val(GetUriParam("entity"));
|
$("#entity").val(GetUriParam("entity"));
|
||||||
$("#entity").trigger("change");
|
$("#entity").trigger("change");
|
||||||
$('#name').focus();
|
setTimeout(function()
|
||||||
|
{
|
||||||
|
$('#name').focus();
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$('#entity').focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#type").trigger("change");
|
$("#type").trigger("change");
|
||||||
|
Reference in New Issue
Block a user