mirror of
https://github.com/grocy/grocy.git
synced 2025-08-17 11:06:36 +00:00
@@ -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');
|
||||
|
Reference in New Issue
Block a user