mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
parent
bfb5525ec1
commit
c889416c0a
@ -244,17 +244,14 @@ if (GetUriParam("embedded") !== undefined)
|
||||
}
|
||||
|
||||
var eitherRequiredFields = $("#product_id,#product_id_text_input,#note");
|
||||
eitherRequiredFields.on("input", function()
|
||||
eitherRequiredFields.prop('required',"");
|
||||
eitherRequiredFields.on('input', function ()
|
||||
{
|
||||
eitherRequiredFields.attr("required", "");
|
||||
if (!$(this).val().isEmpty())
|
||||
{
|
||||
eitherRequiredFields.not(this).removeAttr("required");
|
||||
}
|
||||
|
||||
eitherRequiredFields.not(this).prop('required', !$(this).val().length);
|
||||
Grocy.FrontendHelpers.ValidateForm('shoppinglist-form');
|
||||
});
|
||||
|
||||
|
||||
if (GetUriParam("product-name") != null)
|
||||
{
|
||||
Grocy.Components.ProductPicker.GetPicker().trigger('change');
|
||||
|
Loading…
x
Reference in New Issue
Block a user