mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 02:04:38 +00:00
Add an option to make Userfields mandatory (closes #1339)
This commit is contained in:
@@ -158,6 +158,11 @@ Grocy.Components.UserfieldsForm.Load = function()
|
||||
input.val(value);
|
||||
}
|
||||
});
|
||||
|
||||
$("form").each(function()
|
||||
{
|
||||
Grocy.FrontendHelpers.ValidateForm(this.id);
|
||||
});
|
||||
},
|
||||
function(xhr)
|
||||
{
|
||||
@@ -179,3 +184,11 @@ $(".userfield-link").keyup(function(e)
|
||||
|
||||
formRow.find(".userfield-input").val(JSON.stringify(value));
|
||||
});
|
||||
|
||||
$(".userfield-input").change(function(e)
|
||||
{
|
||||
$("form").each(function()
|
||||
{
|
||||
Grocy.FrontendHelpers.ValidateForm(this.id);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user